nba_team_stats_00_to_21 <- read.csv("~/Desktop/2022:2023 Wesleyan/QAC211/nba team stats 2000-2021/nba_team_stats_00_to_21.csv")
df <- nba_team_stats_00_to_21[-(330:626),]
df20152020<- df[-(180:329),]
str(df)
## 'data.frame': 329 obs. of 29 variables:
## $ teamstatspk: int 0 1 2 3 4 5 6 7 8 9 ...
## $ TEAM : chr "Phoenix Suns" "Golden State Warriors" "Memphis Grizzlies" "Miami Heat" ...
## $ GP : int 52 53 55 54 53 55 54 53 53 54 ...
## $ W : int 42 40 37 34 33 34 33 32 32 31 ...
## $ L : int 10 13 18 20 20 21 21 21 21 23 ...
## $ WIN. : num 0.808 0.755 0.673 0.63 0.623 0.618 0.611 0.604 0.604 0.574 ...
## $ MIN : num 48.1 48.2 48.3 48.5 48.1 48.2 48 48.4 48 48.3 ...
## $ PTS : num 113 111 113 109 112 ...
## $ FGM : num 42.7 40.4 42.7 39.3 41.6 40.7 39.5 39.6 40.6 39.1 ...
## $ FGA : num 89.4 86.5 93.4 85.7 87 88.9 85.1 85.1 85.9 86.4 ...
## $ FG. : num 47.8 46.7 45.7 45.9 47.8 45.8 46.4 46.6 47.3 45.3 ...
## $ X3PM : num 11.5 14.6 11.1 13.5 11.2 14.3 11.8 11 14.6 12.3 ...
## $ X3PA : num 31.7 40.1 32.7 36.1 30 39.4 33.7 30.9 40 36.8 ...
## $ X3P. : num 36.3 36.4 33.9 37.5 37.2 36.4 35.1 35.8 36.4 33.5 ...
## $ FTM : num 15.8 15.5 16.2 16.5 17.2 16.9 15.7 17.5 17.8 15.6 ...
## $ FTA : num 20 20.3 22 20.2 21.2 21.6 20.9 21.7 22.9 20.2 ...
## $ FT. : num 79.1 76.4 73.7 81.5 81.4 78.2 75.1 80.9 77.8 77 ...
## $ OREB : num 10.2 10.1 13.6 10.8 8.9 10.3 10.4 8.4 10.1 9.5 ...
## $ DREB : num 35.9 36.4 35 33.8 34.1 36.5 34.9 33.7 35.7 34.3 ...
## $ REB : num 46.1 46.5 48.6 44.6 43 46.8 45.3 42.1 45.8 43.8 ...
## $ AST : num 26.5 27.5 25.1 25.9 24.5 23.4 25.5 23.2 22.2 24 ...
## $ TOV : num 13.3 15.6 13.3 14.9 13 13.7 14.9 12.5 14.3 12.6 ...
## $ STL : num 8.6 9.4 10.1 7.6 7.2 7.7 7.2 7.6 7.1 7.1 ...
## $ BLK : num 4.3 4.9 6.4 3.3 4.6 4.2 4.3 5.7 4.8 4.1 ...
## $ BLKA : num 4 4.1 6.4 4.4 5.2 4.5 4.5 4.6 4.2 3.9 ...
## $ PF : num 19.3 20.3 19.1 20.5 18.8 17.8 17 19.1 18.8 19.7 ...
## $ PFD : num 19.3 17.7 19 20 17.8 19.2 19.2 18.9 20.1 19.9 ...
## $ X... : num 7.8 8.3 4.1 4.2 1.7 4 4.4 2.2 6 2.7 ...
## $ SEASON : chr "2020-21" "2020-21" "2020-21" "2020-21" ...
head(df)
## teamstatspk TEAM GP W L WIN. MIN PTS FGM FGA FG.
## 1 0 Phoenix Suns 52 42 10 0.808 48.1 112.7 42.7 89.4 47.8
## 2 1 Golden State Warriors 53 40 13 0.755 48.2 110.9 40.4 86.5 46.7
## 3 2 Memphis Grizzlies 55 37 18 0.673 48.3 112.7 42.7 93.4 45.7
## 4 3 Miami Heat 54 34 20 0.630 48.5 108.7 39.3 85.7 45.9
## 5 4 Chicago Bulls 53 33 20 0.623 48.1 111.6 41.6 87.0 47.8
## 6 5 Milwaukee Bucks 55 34 21 0.618 48.2 112.7 40.7 88.9 45.8
## X3PM X3PA X3P. FTM FTA FT. OREB DREB REB AST TOV STL BLK BLKA PF
## 1 11.5 31.7 36.3 15.8 20.0 79.1 10.2 35.9 46.1 26.5 13.3 8.6 4.3 4.0 19.3
## 2 14.6 40.1 36.4 15.5 20.3 76.4 10.1 36.4 46.5 27.5 15.6 9.4 4.9 4.1 20.3
## 3 11.1 32.7 33.9 16.2 22.0 73.7 13.6 35.0 48.6 25.1 13.3 10.1 6.4 6.4 19.1
## 4 13.5 36.1 37.5 16.5 20.2 81.5 10.8 33.8 44.6 25.9 14.9 7.6 3.3 4.4 20.5
## 5 11.2 30.0 37.2 17.2 21.2 81.4 8.9 34.1 43.0 24.5 13.0 7.2 4.6 5.2 18.8
## 6 14.3 39.4 36.4 16.9 21.6 78.2 10.3 36.5 46.8 23.4 13.7 7.7 4.2 4.5 17.8
## PFD X... SEASON
## 1 19.3 7.8 2020-21
## 2 17.7 8.3 2020-21
## 3 19.0 4.1 2020-21
## 4 20.0 4.2 2020-21
## 5 17.8 1.7 2020-21
## 6 19.2 4.0 2020-21
str(df20152020)
## 'data.frame': 179 obs. of 29 variables:
## $ teamstatspk: int 0 1 2 3 4 5 6 7 8 9 ...
## $ TEAM : chr "Phoenix Suns" "Golden State Warriors" "Memphis Grizzlies" "Miami Heat" ...
## $ GP : int 52 53 55 54 53 55 54 53 53 54 ...
## $ W : int 42 40 37 34 33 34 33 32 32 31 ...
## $ L : int 10 13 18 20 20 21 21 21 21 23 ...
## $ WIN. : num 0.808 0.755 0.673 0.63 0.623 0.618 0.611 0.604 0.604 0.574 ...
## $ MIN : num 48.1 48.2 48.3 48.5 48.1 48.2 48 48.4 48 48.3 ...
## $ PTS : num 113 111 113 109 112 ...
## $ FGM : num 42.7 40.4 42.7 39.3 41.6 40.7 39.5 39.6 40.6 39.1 ...
## $ FGA : num 89.4 86.5 93.4 85.7 87 88.9 85.1 85.1 85.9 86.4 ...
## $ FG. : num 47.8 46.7 45.7 45.9 47.8 45.8 46.4 46.6 47.3 45.3 ...
## $ X3PM : num 11.5 14.6 11.1 13.5 11.2 14.3 11.8 11 14.6 12.3 ...
## $ X3PA : num 31.7 40.1 32.7 36.1 30 39.4 33.7 30.9 40 36.8 ...
## $ X3P. : num 36.3 36.4 33.9 37.5 37.2 36.4 35.1 35.8 36.4 33.5 ...
## $ FTM : num 15.8 15.5 16.2 16.5 17.2 16.9 15.7 17.5 17.8 15.6 ...
## $ FTA : num 20 20.3 22 20.2 21.2 21.6 20.9 21.7 22.9 20.2 ...
## $ FT. : num 79.1 76.4 73.7 81.5 81.4 78.2 75.1 80.9 77.8 77 ...
## $ OREB : num 10.2 10.1 13.6 10.8 8.9 10.3 10.4 8.4 10.1 9.5 ...
## $ DREB : num 35.9 36.4 35 33.8 34.1 36.5 34.9 33.7 35.7 34.3 ...
## $ REB : num 46.1 46.5 48.6 44.6 43 46.8 45.3 42.1 45.8 43.8 ...
## $ AST : num 26.5 27.5 25.1 25.9 24.5 23.4 25.5 23.2 22.2 24 ...
## $ TOV : num 13.3 15.6 13.3 14.9 13 13.7 14.9 12.5 14.3 12.6 ...
## $ STL : num 8.6 9.4 10.1 7.6 7.2 7.7 7.2 7.6 7.1 7.1 ...
## $ BLK : num 4.3 4.9 6.4 3.3 4.6 4.2 4.3 5.7 4.8 4.1 ...
## $ BLKA : num 4 4.1 6.4 4.4 5.2 4.5 4.5 4.6 4.2 3.9 ...
## $ PF : num 19.3 20.3 19.1 20.5 18.8 17.8 17 19.1 18.8 19.7 ...
## $ PFD : num 19.3 17.7 19 20 17.8 19.2 19.2 18.9 20.1 19.9 ...
## $ X... : num 7.8 8.3 4.1 4.2 1.7 4 4.4 2.2 6 2.7 ...
## $ SEASON : chr "2020-21" "2020-21" "2020-21" "2020-21" ...
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$FG.
## t = 15.5, df = 327, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.5837547 0.7090368
## sample estimates:
## cor
## 0.6508038
#WIN./FG. p-value < 2.2e-16, cor of 0.6508038, of variables of analysis, FG. has strongest correlation to Win percentage by far.
cor.test(df$WIN., df$OREB)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$OREB
## t = -2.2146, df = 327, p-value = 0.02748
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.22670862 -0.01361144
## sample estimates:
## cor
## -0.1215605
#WIN./OREB p-value = 0.02748, cor of -0.1215605. Bad.OREB is surprisingly negatively correlated to Win percentage, testing for TREB next:
cor.test(df$WIN., df$REB)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$REB
## t = 5.1225, df = 327, p-value = 5.162e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.1694171 0.3697826
## sample estimates:
## cor
## 0.2725523
#WIN./REB p-value = 5.162e-07, cor of 0.2725523 Positively correlated this time. Odd, DREB must be much more positively correlated that means, testing hypothesis:
cor.test(df$WIN., df$DREB)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$DREB
## t = 6.577, df = 327, p-value = 1.903e-10
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.2426419 0.4338941
## sample estimates:
## cor
## 0.3418022
#WIN./DREB p-value = 1.903e-10, cor of 0.3418022
cor.test(df$WIN., df$FT.)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$FT.
## t = 3.4153, df = 327, p-value = 0.0007174
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.07904458 0.28793631
## sample estimates:
## cor
## 0.1855864
#WIN./FT. p-value = 0.0007174, cor of 0.1855864. Not good.
cor.test(df$WIN., df$TOV)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$TOV
## t = -4.2145, df = 327, p-value = 3.242e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.3270804 -0.1218423
## sample estimates:
## cor
## -0.22698
#WIN./TOV p-value = 3.242e-05, cor of -0.22698. Negatively correlated but not strong. #testing for other vars not apart of 4 Factors:
cor.test(df$WIN., df$AST)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$AST
## t = 5.855, df = 327, p-value = 1.161e-08
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.2067986 0.4027519
## sample estimates:
## cor
## 0.3080387
#WIN./AST p-value = 1.161e-08, cor of 0.3080387
cor.test(df$WIN., df$X3P.)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$X3P.
## t = 11.826, df = 327, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.4668235 0.6188294
## sample estimates:
## cor
## 0.5473244
#WIN./X3P. p-value = 2.2e-16, cor of 0.5473244. Second strongest correlation yet. Potentially a gamechanger to the study.
cor.test(df20152020$WIN., df20152020$X3P.)
##
## Pearson's product-moment correlation
##
## data: df20152020$WIN. and df20152020$X3P.
## t = 8.5968, df = 177, p-value = 4.23e-15
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.4303074 0.6385665
## sample estimates:
## cor
## 0.542726
#20152020WIN./20152020X3P. p-value = 4.23e-15, cor of 0.542726. Latest 5 seasons worth of data doesn’t present stronger correlation between X3P. & WIN., unlike I had anticipated.
cor.test(df$WIN., df$PTS)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$PTS
## t = 6.9455, df = 327, p-value = 2.043e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.2605231 0.4492612
## sample estimates:
## cor
## 0.3585507
#WIN./PTS p-value = 2.043e-11, cor of 0.3585507
cor.test(df$WIN., df$X...)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$X...
## t = 68.527, df = 327, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.9590403 0.9732745
## sample estimates:
## cor
## 0.9669015
#WIN./X… p-value < 2.2e-16, cor of 0.9669015. Makes complete sense since X… is a +/- of a team, Winning teams will almsot always be “+” and losing teams “-”.
cor.test(df$WIN., df$STL)
##
## Pearson's product-moment correlation
##
## data: df$WIN. and df$STL
## t = 4.0081, df = 327, p-value = 7.584e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.1108651 0.3171071
## sample estimates:
## cor
## 0.216399
#WIN./STL p-value = 7.584e-05, cor of 0.216399
ggplot(data = df, aes(x = X3P., y = WIN.)) +
geom_point()
#WIN./X3P. is Super linear
ggplot(data = df, aes(x = FG., y = WIN.)) +
geom_point()
#WIN./FG. is Super linear
ggplot(data = df, aes(x = FT., y = WIN.)) +
geom_point()
#Meh
ggplot(data = df, aes(x = OREB, y = WIN.)) +
geom_point()
#WIN./OREB isn’t presenting as much linearity as FG. or X3P.
ggplot(data = df, aes(x = DREB, y = WIN.)) +
geom_point()
#WIN./DREB is presenting some linearity
ggplot(data = df, aes(x = REB, y = WIN.)) +
geom_point()
#WIN./REB is less linear than DREB but still linear
ggplot(data = df, aes(x = TOV, y = WIN.)) +
geom_point()
#WIN./TOV isn’t presenting as much negative correlation as anticipated.
ggplot(data = df, aes(x = X..., y = WIN.)) +
geom_point()
#Most linear plot you can probably get with a given statistic.
ggplot(data = df, aes(x = STL, y = WIN.)) +
geom_point()
#WIN./STL is a very linear model, impressive.
##Simple linear regressions:
WinFG.<- lm(formula = WIN. ~ FG., data = df)
summary(WinFG.)
##
## Call:
## lm(formula = WIN. ~ FG., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.294948 -0.089886 0.006583 0.083052 0.279420
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.454818 0.190764 -12.87 <2e-16 ***
## FG. 0.064898 0.004187 15.50 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.115 on 327 degrees of freedom
## Multiple R-squared: 0.4235, Adjusted R-squared: 0.4218
## F-statistic: 240.3 on 1 and 327 DF, p-value: < 2.2e-16
#WinFG.:Adjusted R-squared: 0.4218
WinOREB.<- lm(formula = WIN. ~ OREB, data = df)
summary(WinOREB.)
##
## Call:
## lm(formula = WIN. ~ OREB, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.39843 -0.11293 0.01015 0.10412 0.38109
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.65839 0.07179 9.171 <2e-16 ***
## OREB -0.01495 0.00675 -2.215 0.0275 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1504 on 327 degrees of freedom
## Multiple R-squared: 0.01478, Adjusted R-squared: 0.01176
## F-statistic: 4.905 on 1 and 327 DF, p-value: 0.02748
#WinOREB.:Adjusted R-squared: 0.01176
WinFT.<- lm(formula = WIN. ~ FT., data = df)
summary(WinFT.)
##
## Call:
## lm(formula = WIN. ~ FT., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.37919 -0.11111 0.00943 0.10712 0.38899
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.209242 0.207961 -1.006 0.315082
## FT. 0.009309 0.002726 3.415 0.000717 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1489 on 327 degrees of freedom
## Multiple R-squared: 0.03444, Adjusted R-squared: 0.03149
## F-statistic: 11.66 on 1 and 327 DF, p-value: 0.0007174
#WinFT.:Adjusted R-squared: 0.03149
WinTOV<- lm(formula = WIN. ~ TOV, data = df)
summary(WinTOV)
##
## Call:
## lm(formula = WIN. ~ TOV, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.38847 -0.12417 0.00091 0.10307 0.41814
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.962752 0.109993 8.753 < 2e-16 ***
## TOV -0.032295 0.007663 -4.215 3.24e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1476 on 327 degrees of freedom
## Multiple R-squared: 0.05152, Adjusted R-squared: 0.04862
## F-statistic: 17.76 on 1 and 327 DF, p-value: 3.242e-05
#WinTOV:Adjusted R-squared: 0.04862
WinREB<- lm(formula = WIN. ~ REB, data = df)
summary(WinREB)
##
## Call:
## lm(formula = WIN. ~ REB, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.3366 -0.1175 0.0170 0.1063 0.3963
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.331548 0.162619 -2.039 0.0423 *
## REB 0.019177 0.003744 5.123 5.16e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1458 on 327 degrees of freedom
## Multiple R-squared: 0.07428, Adjusted R-squared: 0.07145
## F-statistic: 26.24 on 1 and 327 DF, p-value: 5.162e-07
#WinREB:Adjusted R-squared: 0.07145
WinDREB.<- lm(formula = WIN. ~ DREB, data = df)
summary(WinDREB.)
##
## Call:
## lm(formula = WIN. ~ DREB, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.35375 -0.11615 0.01047 0.09985 0.36310
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.293254 0.120935 -2.425 0.0159 *
## DREB 0.024183 0.003677 6.577 1.9e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1424 on 327 degrees of freedom
## Multiple R-squared: 0.1168, Adjusted R-squared: 0.1141
## F-statistic: 43.26 on 1 and 327 DF, p-value: 1.903e-10
#WinDREB.:Adjusted R-squared: 0.1141
WinX3P.<- lm(formula = WIN. ~ X3P., data = df)
summary(WinX3P.)
##
## Call:
## lm(formula = WIN. ~ X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.309276 -0.091115 0.004714 0.088874 0.269403
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.142867 0.139135 -8.214 5.03e-15 ***
## X3P. 0.046321 0.003917 11.826 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1268 on 327 degrees of freedom
## Multiple R-squared: 0.2996, Adjusted R-squared: 0.2974
## F-statistic: 139.9 on 1 and 327 DF, p-value: < 2.2e-16
#WinX3P.:Adjusted R-squared: 0.2974
WinPTS<- lm(formula = WIN. ~ PTS, data = df)
summary(WinPTS)
##
## Call:
## lm(formula = WIN. ~ PTS, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32467 -0.11535 0.00980 0.09495 0.32063
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.377136 0.126594 -2.979 0.00311 **
## PTS 0.008458 0.001218 6.946 2.04e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1414 on 327 degrees of freedom
## Multiple R-squared: 0.1286, Adjusted R-squared: 0.1259
## F-statistic: 48.24 on 1 and 327 DF, p-value: 2.043e-11
#WinPTS:Adjusted R-squared: 0.1259
WinX...<- lm(formula = WIN. ~ X..., data = df)
summary(WinX...)
##
## Call:
## lm(formula = WIN. ~ X..., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.130198 -0.024456 0.004005 0.026942 0.081539
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.5001982 0.0021312 234.70 <2e-16 ***
## X... 0.0314026 0.0004583 68.53 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03866 on 327 degrees of freedom
## Multiple R-squared: 0.9349, Adjusted R-squared: 0.9347
## F-statistic: 4696 on 1 and 327 DF, p-value: < 2.2e-16
#WinX…:Adjusted R-squared: 0.9347
WinSTL<- lm(formula = WIN. ~ STL, data = df)
summary(WinSTL)
##
## Call:
## lm(formula = WIN. ~ STL, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.40256 -0.10857 0.01057 0.11217 0.36158
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.20454 0.07428 2.754 0.00622 **
## STL 0.03856 0.00962 4.008 7.58e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1479 on 327 degrees of freedom
## Multiple R-squared: 0.04683, Adjusted R-squared: 0.04391
## F-statistic: 16.07 on 1 and 327 DF, p-value: 7.584e-05
#WinSTL:Adjusted R-squared: 0.04391
Win4Factors<- lm(formula = WIN. ~ FG. + OREB + FT. + TOV, data = df)
summary(Win4Factors)
##
## Call:
## lm(formula = WIN. ~ FG. + OREB + FT. + TOV, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.31727 -0.07467 -0.00124 0.07390 0.32103
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.791625 0.294234 -9.488 < 2e-16 ***
## FG. 0.071271 0.004281 16.650 < 2e-16 ***
## OREB 0.026704 0.005530 4.829 2.12e-06 ***
## FT. 0.002779 0.002164 1.284 0.2
## TOV -0.031257 0.005845 -5.348 1.69e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1077 on 324 degrees of freedom
## Multiple R-squared: 0.4989, Adjusted R-squared: 0.4927
## F-statistic: 80.64 on 4 and 324 DF, p-value: < 2.2e-16
#Win4Factors: Adjusted R-squared: 0.4927
Win4FactorsX3P.<- lm(formula = WIN. ~ FG. + OREB + FT. + TOV + X3P., data = df)
summary(Win4FactorsX3P.)
##
## Call:
## lm(formula = WIN. ~ FG. + OREB + FT. + TOV + X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.260747 -0.065096 0.001939 0.074087 0.302863
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.993862 0.285782 -10.476 < 2e-16 ***
## FG. 0.058322 0.004815 12.112 < 2e-16 ***
## OREB 0.029808 0.005355 5.567 5.47e-08 ***
## FT. 0.002093 0.002087 1.003 0.317
## TOV -0.026689 0.005693 -4.688 4.07e-06 ***
## X3P. 0.021029 0.004051 5.191 3.70e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1037 on 323 degrees of freedom
## Multiple R-squared: 0.5375, Adjusted R-squared: 0.5303
## F-statistic: 75.07 on 5 and 323 DF, p-value: < 2.2e-16
#Win4FactorsX3P.: Adjusted R-squared: 0.5303 #Next, I’m going to run seperate models where one of the 4 Factors is swapped out for X3P.
Win4FactorsX3P.2<- lm(formula = WIN. ~ FG. + OREB + FT. + X3P., data = df)
summary(Win4FactorsX3P.2)
##
## Call:
## lm(formula = WIN. ~ FG. + OREB + FT. + X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.244228 -0.075687 0.006798 0.076993 0.284827
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.491089 0.273833 -12.749 < 2e-16 ***
## FG. 0.055586 0.004932 11.270 < 2e-16 ***
## OREB 0.027550 0.005503 5.006 9.13e-07 ***
## FT. 0.004185 0.002103 1.990 0.0475 *
## X3P. 0.023965 0.004130 5.803 1.55e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.107 on 324 degrees of freedom
## Multiple R-squared: 0.506, Adjusted R-squared: 0.4999
## F-statistic: 82.97 on 4 and 324 DF, p-value: < 2.2e-16
#Win4FactorsX3P.2: Adjusted R-squared: 0.4999
Win4FactorsX3P.3<- lm(formula = WIN. ~ FG. + OREB + TOV + X3P., data = df)
summary(Win4FactorsX3P.3)
##
## Call:
## lm(formula = WIN. ~ FG. + OREB + TOV + X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.267191 -0.064105 0.004537 0.075357 0.297790
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.821257 0.228170 -12.365 < 2e-16 ***
## FG. 0.058531 0.004811 12.166 < 2e-16 ***
## OREB 0.028464 0.005185 5.490 8.12e-08 ***
## TOV -0.027910 0.005561 -5.019 8.59e-07 ***
## X3P. 0.021287 0.004043 5.265 2.55e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1037 on 324 degrees of freedom
## Multiple R-squared: 0.536, Adjusted R-squared: 0.5303
## F-statistic: 93.58 on 4 and 324 DF, p-value: < 2.2e-16
#Win4FactorsX3P.3: Adjusted R-squared: 0.5303
Win4FactorsX3P.4<- lm(formula = WIN. ~ FG. + FT. + TOV + X3P., data = df)
summary(Win4FactorsX3P.4)
##
## Call:
## lm(formula = WIN. ~ FG. + FT. + TOV + X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.231690 -0.073622 -0.002886 0.077861 0.307038
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.1140031 0.2488670 -8.495 7.31e-16 ***
## FG. 0.0518466 0.0048841 10.615 < 2e-16 ***
## FT. -0.0008127 0.0021117 -0.385 0.701
## TOV -0.0238395 0.0059260 -4.023 7.16e-05 ***
## X3P. 0.0185114 0.0042076 4.400 1.47e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1084 on 324 degrees of freedom
## Multiple R-squared: 0.4931, Adjusted R-squared: 0.4868
## F-statistic: 78.8 on 4 and 324 DF, p-value: < 2.2e-16
#Win4FactorsX3P.4: Adjusted R-squared: 0.4868
Win4FactorsX3P.5<- lm(formula = WIN. ~ OREB + FT. + TOV + X3P., data = df)
summary(Win4FactorsX3P.5)
##
## Call:
## lm(formula = WIN. ~ OREB + FT. + TOV + X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.307403 -0.090840 0.007108 0.085003 0.301425
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.277069 0.298783 -4.274 2.53e-05 ***
## OREB 0.014141 0.006256 2.260 0.02447 *
## FT. 0.003186 0.002510 1.269 0.20529
## TOV -0.018334 0.006803 -2.695 0.00741 **
## X3P. 0.046444 0.004172 11.133 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1248 on 324 degrees of freedom
## Multiple R-squared: 0.3274, Adjusted R-squared: 0.3191
## F-statistic: 39.43 on 4 and 324 DF, p-value: < 2.2e-16
#Win4FactorsX3P.5: Adjusted R-squared: 0.3191 #Out of all the models swapping X3P. for one of the four factors, the one replacing FT. had the highest R^2.
Win4FactorsX3P.6<- lm(formula = WIN. ~ FG. + REB + TOV + X3P., data = df)
summary(Win4FactorsX3P.6)
##
## Call:
## lm(formula = WIN. ~ FG. + REB + TOV + X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.259612 -0.072682 0.002599 0.071300 0.305790
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.806566 0.214677 -13.073 < 2e-16 ***
## FG. 0.048810 0.004583 10.651 < 2e-16 ***
## REB 0.017250 0.002632 6.554 2.21e-10 ***
## TOV -0.025120 0.005407 -4.646 4.93e-06 ***
## X3P. 0.019606 0.003941 4.975 1.06e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1018 on 324 degrees of freedom
## Multiple R-squared: 0.5522, Adjusted R-squared: 0.5467
## F-statistic: 99.9 on 4 and 324 DF, p-value: < 2.2e-16
#Win4FactorsX3P.6: Adjusted R-squared: 0.5467, Use REB or even DREB over OREB, Found a flaw in 4 Factors.
Win4FactorsX3P.7<- lm(formula = WIN. ~ FG. + DREB + TOV + X3P., data = df)
summary(Win4FactorsX3P.7)
##
## Call:
## lm(formula = WIN. ~ FG. + DREB + TOV + X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.234745 -0.075297 0.000114 0.076581 0.311440
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.316840 0.203658 -11.376 < 2e-16 ***
## FG. 0.047348 0.004901 9.660 < 2e-16 ***
## DREB 0.010524 0.002881 3.653 0.000303 ***
## TOV -0.022716 0.005634 -4.032 6.90e-05 ***
## X3P. 0.018067 0.004107 4.399 1.47e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1062 on 324 degrees of freedom
## Multiple R-squared: 0.5129, Adjusted R-squared: 0.5069
## F-statistic: 85.3 on 4 and 324 DF, p-value: < 2.2e-16
#Win4FactorsX3P.7: Adjusted R-squared: 0.5069
Win4FactorsX3P.8<- lm(formula = WIN. ~ FG. + REB + TOV + X3P. + STL, data = df)
summary(Win4FactorsX3P.8)
##
## Call:
## lm(formula = WIN. ~ FG. + REB + TOV + X3P. + STL, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.267840 -0.067706 0.002061 0.067842 0.247061
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.909784 0.207008 -14.056 < 2e-16 ***
## FG. 0.042982 0.004533 9.482 < 2e-16 ***
## REB 0.019473 0.002561 7.604 3.16e-13 ***
## TOV -0.030538 0.005289 -5.773 1.82e-08 ***
## X3P. 0.021674 0.003804 5.698 2.73e-08 ***
## STL 0.036008 0.006743 5.340 1.76e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09778 on 323 degrees of freedom
## Multiple R-squared: 0.5886, Adjusted R-squared: 0.5822
## F-statistic: 92.41 on 5 and 323 DF, p-value: < 2.2e-16
#Win4FactorsX3P.8: Adjusted R-squared: 0.5822
WinFT.X3P.<- lm(formula = WIN. ~ FT. + X3P., data = df)
summary(WinFT.X3P.)
##
## Call:
## lm(formula = WIN. ~ FT. + X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.30472 -0.09721 0.00571 0.09900 0.27186
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.337668 0.203542 -6.572 1.97e-10 ***
## FT. 0.003122 0.002384 1.310 0.191
## X3P. 0.045102 0.004022 11.214 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1267 on 326 degrees of freedom
## Multiple R-squared: 0.3032, Adjusted R-squared: 0.299
## F-statistic: 70.94 on 2 and 326 DF, p-value: < 2.2e-16
#WinFT.X3P.: Adjusted R-squared: 0.299 #Checking for moderators:
FT3P<- (df$FT.*df$X3P.)
WinFT.xX3P.<- lm(formula = WIN. ~ FT3P, data = df)
summary(WinFT.xX3P.)
##
## Call:
## lm(formula = WIN. ~ FT3P, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.309558 -0.096351 0.008605 0.093084 0.311899
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -5.526e-01 1.030e-01 -5.364 1.55e-07 ***
## FT3P 3.892e-04 3.798e-05 10.246 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1318 on 327 degrees of freedom
## Multiple R-squared: 0.243, Adjusted R-squared: 0.2407
## F-statistic: 105 on 1 and 327 DF, p-value: < 2.2e-16
#WinFT.xX3P.: Adjusted R-squared: 0.2407, not a moderator presence
WinFG.X3P.<- lm(formula = WIN. ~ FG. + X3P., data = df)
summary(WinFG.X3P.)
##
## Call:
## lm(formula = WIN. ~ FG. + X3P., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.242172 -0.079769 0.006042 0.081319 0.260685
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.550055 0.184604 -13.814 < 2e-16 ***
## FG. 0.050090 0.004946 10.127 < 2e-16 ***
## X3P. 0.021691 0.004198 5.167 4.15e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1108 on 326 degrees of freedom
## Multiple R-squared: 0.4672, Adjusted R-squared: 0.4639
## F-statistic: 142.9 on 2 and 326 DF, p-value: < 2.2e-16
#WinFG.X3P.: Adjusted R-squared: 0.4639
FG3P<- (df$FG.*df$X3P.)
WinFG.xX3P.<- lm(formula = WIN. ~ FG3P, data = df)
summary(WinFG.xX3P.)
##
## Call:
## lm(formula = WIN. ~ FG3P, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.281013 -0.086260 -0.001707 0.087098 0.252902
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -8.313e-01 8.451e-02 -9.837 <2e-16 ***
## FG3P 8.236e-04 5.212e-05 15.803 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1141 on 327 degrees of freedom
## Multiple R-squared: 0.433, Adjusted R-squared: 0.4313
## F-statistic: 249.7 on 1 and 327 DF, p-value: < 2.2e-16
#WinFG.xX3P.: Adjusted R-squared: 0.4313, not a moderator
Winfit4<- lm(formula = WIN. ~ OREB + FT. + TOV, data = df)
summary(Winfit4)
##
## Call:
## lm(formula = WIN. ~ OREB + FT. + TOV, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.38124 -0.11689 0.00524 0.10662 0.40943
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.484013 0.297574 1.627 0.104806
## OREB -0.005730 0.007040 -0.814 0.416292
## FT. 0.005989 0.002932 2.043 0.041877 *
## TOV -0.026521 0.007940 -3.340 0.000935 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1465 on 325 degrees of freedom
## Multiple R-squared: 0.07013, Adjusted R-squared: 0.06155
## F-statistic: 8.171 on 3 and 325 DF, p-value: 2.93e-05
#Winfit4: Adjusted R-squared: 0.06155, bad.
Winfit4pt2<- lm(formula = WIN. ~ REB + FT. + TOV, data = df)
summary(Winfit4pt2)
##
## Call:
## lm(formula = WIN. ~ REB + FT. + TOV, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32711 -0.10923 0.00244 0.09671 0.39586
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.501950 0.297820 -1.685 0.092868 .
## REB 0.020389 0.003601 5.661 3.31e-08 ***
## FT. 0.007054 0.002661 2.651 0.008422 **
## TOV -0.029336 0.007556 -3.882 0.000125 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.14 on 325 degrees of freedom
## Multiple R-squared: 0.1519, Adjusted R-squared: 0.144
## F-statistic: 19.4 on 3 and 325 DF, p-value: 1.354e-11
#Winfit4pt2: Adjusted R-squared: 0.144, bad.
singlemodelling<- tab_model(WinFG., WinOREB., WinFT., WinTOV, WinREB, WinDREB., WinX3P., WinPTS, WinX..., WinSTL, dv.labels = c('WinFG.', 'WinOREB.', 'WinFT.', 'WinTOV', 'WinREB', 'WinDREB.', 'WinX3P.', 'WinPTS', 'WinX...', 'WinSTL'), show.aic = TRUE)
multiplemodelling<- tab_model(Win4Factors, Win4FactorsX3P., Win4FactorsX3P.2,Win4FactorsX3P.3, Win4FactorsX3P.4, Win4FactorsX3P.5, Win4FactorsX3P.6,Win4FactorsX3P.7, Win4FactorsX3P.8, WinFG.X3P., dv.labels = c('Win4Factors', 'Win4FactorsX3P.', 'Win4FactorsX3P.2','Win4FactorsX3P.3', 'Win4FactorsX3P.4', 'Win4FactorsX3P.5', 'Win4FactorsX3P.6','Win4FactorsX3P.7','Win4FactorsX3P.8', 'WinFG.X3P.'), show.aic = TRUE)
fit1_LM <- stepAIC(Win4FactorsX3P.6, direction = 'both')
## Start: AIC=-1498.08
## WIN. ~ FG. + REB + TOV + X3P.
##
## Df Sum of Sq RSS AIC
## <none> 3.3609 -1498.1
## - TOV 1 0.22389 3.5848 -1478.9
## - X3P. 1 0.25670 3.6176 -1475.9
## - REB 1 0.44557 3.8065 -1459.1
## - FG. 1 1.17672 4.5377 -1401.3
fit2_LM <- stepAIC(Win4FactorsX3P., direction = 'both')
## Start: AIC=-1485.41
## WIN. ~ FG. + OREB + FT. + TOV + X3P.
##
## Df Sum of Sq RSS AIC
## - FT. 1 0.01081 3.4825 -1486.4
## <none> 3.4717 -1485.4
## - TOV 1 0.23627 3.7080 -1465.8
## - X3P. 1 0.28968 3.7614 -1461.0
## - OREB 1 0.33306 3.8048 -1457.3
## - FG. 1 1.57675 5.0485 -1364.2
##
## Step: AIC=-1486.39
## WIN. ~ FG. + OREB + TOV + X3P.
##
## Df Sum of Sq RSS AIC
## <none> 3.4825 -1486.4
## + FT. 1 0.01081 3.4717 -1485.4
## - TOV 1 0.27076 3.7533 -1463.8
## - X3P. 1 0.29801 3.7805 -1461.4
## - OREB 1 0.32398 3.8065 -1459.1
## - FG. 1 1.59103 5.0736 -1364.6
fit3_LM <- stepAIC(Win4Factors, direction = 'both')
## Start: AIC=-1461.05
## WIN. ~ FG. + OREB + FT. + TOV
##
## Df Sum of Sq RSS AIC
## - FT. 1 0.0191 3.7805 -1461.4
## <none> 3.7614 -1461.0
## - OREB 1 0.2707 4.0321 -1440.2
## - TOV 1 0.3320 4.0934 -1435.2
## - FG. 1 3.2182 6.9796 -1259.7
##
## Step: AIC=-1461.38
## WIN. ~ FG. + OREB + TOV
##
## Df Sum of Sq RSS AIC
## <none> 3.7805 -1461.4
## + FT. 1 0.0191 3.7614 -1461.0
## - OREB 1 0.2515 4.0321 -1442.2
## - TOV 1 0.3891 4.1697 -1431.1
## - FG. 1 3.2887 7.0693 -1257.5
#fit3_LM: Lowest AIC of the original Four Factors is if I remove FT., as predicted by prior regressions. #AIC of all single models:
AIC(WinFG.)
## [1] -485.3049
#WinFG.: -485.3049
AIC(WinOREB.)
## [1] -308.9701
#WinOREB.: -308.9701
AIC(WinFT.)
## [1] -315.6035
#WinFT.: -315.6035
AIC(WinTOV)
## [1] -321.4745
#WinTOV: -321.4745
AIC(WinREB)
## [1] -329.4673
#WinREB: -329.4673
AIC(WinDREB.)
## [1] -344.9459
#WinDREB.: -344.9459
AIC(WinX3P.)
## [1] -421.2134
#WinX3P.: -421.2134
AIC(WinPTS)
## [1] -349.3448
#WinPTS: -349.3448
AIC(WinSTL)
## [1] -319.8512
#WinSTL: 319.8512 #AIC of all multiple models:
AIC(Win4Factors)
## [1] -525.3848
#Win4Factors:-525.3848
AIC(Win4FactorsX3P.)
## [1] -549.7511
#Win4FactorsX3P.: -549.7511
AIC(Win4FactorsX3P.2)
## [1] -530.0901
#Win4FactorsX3P.2:-530.0901
AIC(Win4FactorsX3P.3)
## [1] -550.7278
#Win4FactorsX3P.3:-550.7278
AIC(Win4FactorsX3P.4)
## [1] -521.6123
#Win4FactorsX3P.4:-521.6123
AIC(Win4FactorsX3P.5)
## [1] -428.5622
#Win4FactorsX3P.5:-428.5622
AIC(Win4FactorsX3P.6)
## [1] -562.4199
#Win4FactorsX3P.6: -562.4199
AIC(Win4FactorsX3P.7)
## [1] -534.738
#Win4FactorsX3P.7:-534.738
AIC(Win4FactorsX3P.8)
## [1] -588.2551
#Win4FactorsX3P.8:-588.2551
AIC(WinFG.X3P.)
## [1] -509.2051
#WinFG.X3P.:-509.2051
AIC(Winfit4)
## [1] -323.9951
#Winfit4:-323.9951
AIC(Winfit4pt2)
## [1] -354.267
#Winfit4pt2: -354.267
plot(Win4FactorsX3P.8) #residuals mean is not zero, Heteroskedasticity
#after plotting best model, Win4FactorsX3P.8, residuals mean is not zero, Heteroskedasticity, BAD.
str(df)
## 'data.frame': 329 obs. of 29 variables:
## $ teamstatspk: int 0 1 2 3 4 5 6 7 8 9 ...
## $ TEAM : chr "Phoenix Suns" "Golden State Warriors" "Memphis Grizzlies" "Miami Heat" ...
## $ GP : int 52 53 55 54 53 55 54 53 53 54 ...
## $ W : int 42 40 37 34 33 34 33 32 32 31 ...
## $ L : int 10 13 18 20 20 21 21 21 21 23 ...
## $ WIN. : num 0.808 0.755 0.673 0.63 0.623 0.618 0.611 0.604 0.604 0.574 ...
## $ MIN : num 48.1 48.2 48.3 48.5 48.1 48.2 48 48.4 48 48.3 ...
## $ PTS : num 113 111 113 109 112 ...
## $ FGM : num 42.7 40.4 42.7 39.3 41.6 40.7 39.5 39.6 40.6 39.1 ...
## $ FGA : num 89.4 86.5 93.4 85.7 87 88.9 85.1 85.1 85.9 86.4 ...
## $ FG. : num 47.8 46.7 45.7 45.9 47.8 45.8 46.4 46.6 47.3 45.3 ...
## $ X3PM : num 11.5 14.6 11.1 13.5 11.2 14.3 11.8 11 14.6 12.3 ...
## $ X3PA : num 31.7 40.1 32.7 36.1 30 39.4 33.7 30.9 40 36.8 ...
## $ X3P. : num 36.3 36.4 33.9 37.5 37.2 36.4 35.1 35.8 36.4 33.5 ...
## $ FTM : num 15.8 15.5 16.2 16.5 17.2 16.9 15.7 17.5 17.8 15.6 ...
## $ FTA : num 20 20.3 22 20.2 21.2 21.6 20.9 21.7 22.9 20.2 ...
## $ FT. : num 79.1 76.4 73.7 81.5 81.4 78.2 75.1 80.9 77.8 77 ...
## $ OREB : num 10.2 10.1 13.6 10.8 8.9 10.3 10.4 8.4 10.1 9.5 ...
## $ DREB : num 35.9 36.4 35 33.8 34.1 36.5 34.9 33.7 35.7 34.3 ...
## $ REB : num 46.1 46.5 48.6 44.6 43 46.8 45.3 42.1 45.8 43.8 ...
## $ AST : num 26.5 27.5 25.1 25.9 24.5 23.4 25.5 23.2 22.2 24 ...
## $ TOV : num 13.3 15.6 13.3 14.9 13 13.7 14.9 12.5 14.3 12.6 ...
## $ STL : num 8.6 9.4 10.1 7.6 7.2 7.7 7.2 7.6 7.1 7.1 ...
## $ BLK : num 4.3 4.9 6.4 3.3 4.6 4.2 4.3 5.7 4.8 4.1 ...
## $ BLKA : num 4 4.1 6.4 4.4 5.2 4.5 4.5 4.6 4.2 3.9 ...
## $ PF : num 19.3 20.3 19.1 20.5 18.8 17.8 17 19.1 18.8 19.7 ...
## $ PFD : num 19.3 17.7 19 20 17.8 19.2 19.2 18.9 20.1 19.9 ...
## $ X... : num 7.8 8.3 4.1 4.2 1.7 4 4.4 2.2 6 2.7 ...
## $ SEASON : chr "2020-21" "2020-21" "2020-21" "2020-21" ...
head(df)
## teamstatspk TEAM GP W L WIN. MIN PTS FGM FGA FG.
## 1 0 Phoenix Suns 52 42 10 0.808 48.1 112.7 42.7 89.4 47.8
## 2 1 Golden State Warriors 53 40 13 0.755 48.2 110.9 40.4 86.5 46.7
## 3 2 Memphis Grizzlies 55 37 18 0.673 48.3 112.7 42.7 93.4 45.7
## 4 3 Miami Heat 54 34 20 0.630 48.5 108.7 39.3 85.7 45.9
## 5 4 Chicago Bulls 53 33 20 0.623 48.1 111.6 41.6 87.0 47.8
## 6 5 Milwaukee Bucks 55 34 21 0.618 48.2 112.7 40.7 88.9 45.8
## X3PM X3PA X3P. FTM FTA FT. OREB DREB REB AST TOV STL BLK BLKA PF
## 1 11.5 31.7 36.3 15.8 20.0 79.1 10.2 35.9 46.1 26.5 13.3 8.6 4.3 4.0 19.3
## 2 14.6 40.1 36.4 15.5 20.3 76.4 10.1 36.4 46.5 27.5 15.6 9.4 4.9 4.1 20.3
## 3 11.1 32.7 33.9 16.2 22.0 73.7 13.6 35.0 48.6 25.1 13.3 10.1 6.4 6.4 19.1
## 4 13.5 36.1 37.5 16.5 20.2 81.5 10.8 33.8 44.6 25.9 14.9 7.6 3.3 4.4 20.5
## 5 11.2 30.0 37.2 17.2 21.2 81.4 8.9 34.1 43.0 24.5 13.0 7.2 4.6 5.2 18.8
## 6 14.3 39.4 36.4 16.9 21.6 78.2 10.3 36.5 46.8 23.4 13.7 7.7 4.2 4.5 17.8
## PFD X... SEASON
## 1 19.3 7.8 2020-21
## 2 17.7 8.3 2020-21
## 3 19.0 4.1 2020-21
## 4 20.0 4.2 2020-21
## 5 17.8 1.7 2020-21
## 6 19.2 4.0 2020-21
df_labels <- df$teamyear
table(df_labels)
## < table of extent 0 >
df_data <- df[9:28]
df_scale <- scale(df_data)
fviz_nbclust(df_scale, kmeans, method = "wss")
#within sum squares (elbow method) shows number of centers determined by where elbow is, which is where it falls flat. Hard to say here, but ~4/5
output <- kmeans(df_scale, centers = 4, nstart = 100)
print(output)
## K-means clustering with 4 clusters of sizes 55, 86, 83, 105
##
## Cluster means:
## FGM FGA FG. X3PM X3PA X3P.
## 1 -0.25461442 -0.5426754 0.2691966 -0.44838093 -0.45410930 -0.04386922
## 2 1.09718252 1.1063144 0.3933006 1.17598948 1.18090763 0.17117279
## 3 -0.98799087 -0.6030043 -0.8663061 -0.89335873 -0.81172334 -0.71217825
## 4 0.01570799 -0.1452051 0.2216547 -0.02214637 -0.08770483 0.44574039
## FTM FTA FT. OREB DREB REB
## 1 1.31328335 1.39562395 -0.1417109 0.4269550 -0.049208928 0.1983350
## 2 0.03907963 -0.04038017 0.2049159 -0.0524214 0.943233839 0.9050132
## 3 -0.16780573 -0.01723865 -0.4000010 0.5939770 -0.956743255 -0.6114646
## 4 -0.58727197 -0.68434109 0.2225849 -0.6502322 0.009505438 -0.3617905
## AST TOV STL BLK BLKA PF
## 1 -0.5054562 0.37960101 0.07254331 0.3528637 0.1102654 0.3265350
## 2 0.9769319 0.03768008 0.13516903 0.1927819 -0.1316289 0.1819729
## 3 -0.7974461 0.29790759 -0.01285772 -0.1186225 0.5371399 0.2845042
## 4 0.0949712 -0.46518926 -0.13854503 -0.2489626 -0.3745441 -0.5449804
## PFD X...
## 1 1.10118219 0.48500182
## 2 0.16645359 0.34598807
## 3 -0.06153914 -0.77439191
## 4 -0.66449790 0.07470909
##
## Clustering vector:
## 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
## 2 2 2 2 4 2 2 4 2 4 2 2 2 2 2 2 4 2 2 4
## 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
## 2 2 2 2 2 2 4 2 3 4 2 2 2 2 2 2 4 2 1 2
## 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
## 2 2 2 2 2 2 2 2 2 2 2 4 2 2 2 4 2 2 4 2
## 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
## 2 2 2 2 2 2 2 2 2 2 4 1 4 2 2 2 2 2 2 2
## 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
## 2 2 4 2 2 2 4 4 3 3 2 2 2 4 2 4 4 4 2 2
## 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
## 4 4 4 2 4 4 4 1 4 1 2 4 2 4 4 4 4 4 3 3
## 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
## 2 4 2 4 4 1 1 4 4 1 1 3 4 4 4 4 4 2 4 4
## 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
## 4 4 4 1 4 4 3 3 1 1 2 4 4 1 1 1 4 2 4 4
## 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
## 4 1 2 4 4 3 1 4 3 4 3 3 1 4 4 1 3 4 3 3
## 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
## 2 4 1 4 3 4 4 4 1 4 1 4 4 1 3 4 3 3 3 3
## 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
## 3 3 3 3 1 3 3 3 3 3 4 1 1 1 1 4 2 4 3 4
## 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
## 3 1 1 3 4 3 1 4 4 1 3 3 3 1 4 3 3 3 3 3
## 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
## 4 1 4 1 1 3 4 1 3 4 3 1 1 4 3 4 4 3 4 3
## 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
## 4 3 3 3 3 3 3 3 3 4 4 4 1 1 1 1 3 4 3 4
## 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
## 1 3 4 3 1 4 3 4 3 3 3 3 4 3 3 3 3 3 3 3
## 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
## 1 4 1 4 1 4 1 1 1 3 3 3 4 1 1 4 4 1 1 4
## 321 322 323 324 325 326 327 328 329
## 3 3 1 3 3 3 3 3 3
##
## Within cluster sum of squares by cluster:
## [1] 855.0206 1220.4991 1057.5668 1397.9964
## (between_SS / total_SS = 30.9 %)
##
## Available components:
##
## [1] "cluster" "centers" "totss" "withinss" "tot.withinss"
## [6] "betweenss" "size" "iter" "ifault"
output$size
## [1] 55 86 83 105
output$centers
## FGM FGA FG. X3PM X3PA X3P.
## 1 -0.25461442 -0.5426754 0.2691966 -0.44838093 -0.45410930 -0.04386922
## 2 1.09718252 1.1063144 0.3933006 1.17598948 1.18090763 0.17117279
## 3 -0.98799087 -0.6030043 -0.8663061 -0.89335873 -0.81172334 -0.71217825
## 4 0.01570799 -0.1452051 0.2216547 -0.02214637 -0.08770483 0.44574039
## FTM FTA FT. OREB DREB REB
## 1 1.31328335 1.39562395 -0.1417109 0.4269550 -0.049208928 0.1983350
## 2 0.03907963 -0.04038017 0.2049159 -0.0524214 0.943233839 0.9050132
## 3 -0.16780573 -0.01723865 -0.4000010 0.5939770 -0.956743255 -0.6114646
## 4 -0.58727197 -0.68434109 0.2225849 -0.6502322 0.009505438 -0.3617905
## AST TOV STL BLK BLKA PF
## 1 -0.5054562 0.37960101 0.07254331 0.3528637 0.1102654 0.3265350
## 2 0.9769319 0.03768008 0.13516903 0.1927819 -0.1316289 0.1819729
## 3 -0.7974461 0.29790759 -0.01285772 -0.1186225 0.5371399 0.2845042
## 4 0.0949712 -0.46518926 -0.13854503 -0.2489626 -0.3745441 -0.5449804
## PFD X...
## 1 1.10118219 0.48500182
## 2 0.16645359 0.34598807
## 3 -0.06153914 -0.77439191
## 4 -0.66449790 0.07470909
output$cluster
## 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
## 2 2 2 2 4 2 2 4 2 4 2 2 2 2 2 2 4 2 2 4
## 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
## 2 2 2 2 2 2 4 2 3 4 2 2 2 2 2 2 4 2 1 2
## 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
## 2 2 2 2 2 2 2 2 2 2 2 4 2 2 2 4 2 2 4 2
## 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
## 2 2 2 2 2 2 2 2 2 2 4 1 4 2 2 2 2 2 2 2
## 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
## 2 2 4 2 2 2 4 4 3 3 2 2 2 4 2 4 4 4 2 2
## 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
## 4 4 4 2 4 4 4 1 4 1 2 4 2 4 4 4 4 4 3 3
## 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
## 2 4 2 4 4 1 1 4 4 1 1 3 4 4 4 4 4 2 4 4
## 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
## 4 4 4 1 4 4 3 3 1 1 2 4 4 1 1 1 4 2 4 4
## 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
## 4 1 2 4 4 3 1 4 3 4 3 3 1 4 4 1 3 4 3 3
## 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
## 2 4 1 4 3 4 4 4 1 4 1 4 4 1 3 4 3 3 3 3
## 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
## 3 3 3 3 1 3 3 3 3 3 4 1 1 1 1 4 2 4 3 4
## 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
## 3 1 1 3 4 3 1 4 4 1 3 3 3 1 4 3 3 3 3 3
## 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
## 4 1 4 1 1 3 4 1 3 4 3 1 1 4 3 4 4 3 4 3
## 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
## 4 3 3 3 3 3 3 3 3 4 4 4 1 1 1 1 3 4 3 4
## 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
## 1 3 4 3 1 4 3 4 3 3 3 3 4 3 3 3 3 3 3 3
## 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
## 1 4 1 4 1 4 1 1 1 3 3 3 4 1 1 4 4 1 1 4
## 321 322 323 324 325 326 327 328 329
## 3 3 1 3 3 3 3 3 3
kmcluster <- output$cluster
rownames(df_scale) <- df$teamyear
df$teamyear<-paste0(df$TEAM, df$SEASON)
fviz_cluster(output, data = df_scale)
#visualize with argument fviz_cluster =>Clustering visualization
dfcluster<-cbind(df, output$cluster)
dfcluster<- df %>% mutate(cluster = output$cluster)
dfcluster %>% group_by(cluster) %>%
summarize(meanWIN.=mean(WIN.))
## # A tibble: 4 × 2
## cluster meanWIN.
## <int> <dbl>
## 1 1 0.567
## 2 2 0.545
## 3 3 0.386
## 4 4 0.519
#dfcluster meanWIN. argument reveals all clusters except cluster 3 have similar WIN. (~.535 amongst 1/2/4 vs. 0.386 for 3)
dfcluster %>% group_by(cluster) %>%
summarize(meanX3P.=mean(X3P.))
## # A tibble: 4 × 2
## cluster meanX3P.
## <int> <dbl>
## 1 1 35.4
## 2 2 35.8
## 3 3 34.2
## 4 4 36.3
#dfcluster meanX3P. argument reveals all clusters are similar X3P. value, cluster 3 has lowest though, unsurprisingly considering it has by far lowest WIN.
dfcluster %>% group_by(cluster) %>%
summarize(meanFG.=mean(FG.))
## # A tibble: 4 × 2
## cluster meanFG.
## <int> <dbl>
## 1 1 45.9
## 2 2 46.1
## 3 3 44.2
## 4 4 45.9
#dfcluster meanFG. argument reveals all clusters have a similar FG., cluster 3 has lowest though, unsurprisingly considering by far lowest WIN.
dfcluster %>% group_by(cluster) %>%
summarize(meanFT.=mean(FT.))
## # A tibble: 4 × 2
## cluster meanFT.
## <int> <dbl>
## 1 1 75.8
## 2 2 76.9
## 3 3 75.0
## 4 4 76.9
#dfcluster meanFT. argument reveals Cluster 3 lowest FT. but not by much. Clusters 2 and 4 have highest FT. (76.9%)
str(df)
## 'data.frame': 329 obs. of 30 variables:
## $ teamstatspk: int 0 1 2 3 4 5 6 7 8 9 ...
## $ TEAM : chr "Phoenix Suns" "Golden State Warriors" "Memphis Grizzlies" "Miami Heat" ...
## $ GP : int 52 53 55 54 53 55 54 53 53 54 ...
## $ W : int 42 40 37 34 33 34 33 32 32 31 ...
## $ L : int 10 13 18 20 20 21 21 21 21 23 ...
## $ WIN. : num 0.808 0.755 0.673 0.63 0.623 0.618 0.611 0.604 0.604 0.574 ...
## $ MIN : num 48.1 48.2 48.3 48.5 48.1 48.2 48 48.4 48 48.3 ...
## $ PTS : num 113 111 113 109 112 ...
## $ FGM : num 42.7 40.4 42.7 39.3 41.6 40.7 39.5 39.6 40.6 39.1 ...
## $ FGA : num 89.4 86.5 93.4 85.7 87 88.9 85.1 85.1 85.9 86.4 ...
## $ FG. : num 47.8 46.7 45.7 45.9 47.8 45.8 46.4 46.6 47.3 45.3 ...
## $ X3PM : num 11.5 14.6 11.1 13.5 11.2 14.3 11.8 11 14.6 12.3 ...
## $ X3PA : num 31.7 40.1 32.7 36.1 30 39.4 33.7 30.9 40 36.8 ...
## $ X3P. : num 36.3 36.4 33.9 37.5 37.2 36.4 35.1 35.8 36.4 33.5 ...
## $ FTM : num 15.8 15.5 16.2 16.5 17.2 16.9 15.7 17.5 17.8 15.6 ...
## $ FTA : num 20 20.3 22 20.2 21.2 21.6 20.9 21.7 22.9 20.2 ...
## $ FT. : num 79.1 76.4 73.7 81.5 81.4 78.2 75.1 80.9 77.8 77 ...
## $ OREB : num 10.2 10.1 13.6 10.8 8.9 10.3 10.4 8.4 10.1 9.5 ...
## $ DREB : num 35.9 36.4 35 33.8 34.1 36.5 34.9 33.7 35.7 34.3 ...
## $ REB : num 46.1 46.5 48.6 44.6 43 46.8 45.3 42.1 45.8 43.8 ...
## $ AST : num 26.5 27.5 25.1 25.9 24.5 23.4 25.5 23.2 22.2 24 ...
## $ TOV : num 13.3 15.6 13.3 14.9 13 13.7 14.9 12.5 14.3 12.6 ...
## $ STL : num 8.6 9.4 10.1 7.6 7.2 7.7 7.2 7.6 7.1 7.1 ...
## $ BLK : num 4.3 4.9 6.4 3.3 4.6 4.2 4.3 5.7 4.8 4.1 ...
## $ BLKA : num 4 4.1 6.4 4.4 5.2 4.5 4.5 4.6 4.2 3.9 ...
## $ PF : num 19.3 20.3 19.1 20.5 18.8 17.8 17 19.1 18.8 19.7 ...
## $ PFD : num 19.3 17.7 19 20 17.8 19.2 19.2 18.9 20.1 19.9 ...
## $ X... : num 7.8 8.3 4.1 4.2 1.7 4 4.4 2.2 6 2.7 ...
## $ SEASON : chr "2020-21" "2020-21" "2020-21" "2020-21" ...
## $ teamyear : chr "Phoenix Suns2020-21" "Golden State Warriors2020-21" "Memphis Grizzlies2020-21" "Miami Heat2020-21" ...
head(df)
## teamstatspk TEAM GP W L WIN. MIN PTS FGM FGA FG.
## 1 0 Phoenix Suns 52 42 10 0.808 48.1 112.7 42.7 89.4 47.8
## 2 1 Golden State Warriors 53 40 13 0.755 48.2 110.9 40.4 86.5 46.7
## 3 2 Memphis Grizzlies 55 37 18 0.673 48.3 112.7 42.7 93.4 45.7
## 4 3 Miami Heat 54 34 20 0.630 48.5 108.7 39.3 85.7 45.9
## 5 4 Chicago Bulls 53 33 20 0.623 48.1 111.6 41.6 87.0 47.8
## 6 5 Milwaukee Bucks 55 34 21 0.618 48.2 112.7 40.7 88.9 45.8
## X3PM X3PA X3P. FTM FTA FT. OREB DREB REB AST TOV STL BLK BLKA PF
## 1 11.5 31.7 36.3 15.8 20.0 79.1 10.2 35.9 46.1 26.5 13.3 8.6 4.3 4.0 19.3
## 2 14.6 40.1 36.4 15.5 20.3 76.4 10.1 36.4 46.5 27.5 15.6 9.4 4.9 4.1 20.3
## 3 11.1 32.7 33.9 16.2 22.0 73.7 13.6 35.0 48.6 25.1 13.3 10.1 6.4 6.4 19.1
## 4 13.5 36.1 37.5 16.5 20.2 81.5 10.8 33.8 44.6 25.9 14.9 7.6 3.3 4.4 20.5
## 5 11.2 30.0 37.2 17.2 21.2 81.4 8.9 34.1 43.0 24.5 13.0 7.2 4.6 5.2 18.8
## 6 14.3 39.4 36.4 16.9 21.6 78.2 10.3 36.5 46.8 23.4 13.7 7.7 4.2 4.5 17.8
## PFD X... SEASON teamyear
## 1 19.3 7.8 2020-21 Phoenix Suns2020-21
## 2 17.7 8.3 2020-21 Golden State Warriors2020-21
## 3 19.0 4.1 2020-21 Memphis Grizzlies2020-21
## 4 20.0 4.2 2020-21 Miami Heat2020-21
## 5 17.8 1.7 2020-21 Chicago Bulls2020-21
## 6 19.2 4.0 2020-21 Milwaukee Bucks2020-21
results <- prcomp(df_data, scale = TRUE)
str(results)
## List of 5
## $ sdev : num [1:20] 2.34 1.79 1.63 1.27 1.21 ...
## $ rotation: num [1:20, 1:20] -0.382 -0.298 -0.248 -0.354 -0.333 ...
## ..- attr(*, "dimnames")=List of 2
## .. ..$ : chr [1:20] "FGM" "FGA" "FG." "X3PM" ...
## .. ..$ : chr [1:20] "PC1" "PC2" "PC3" "PC4" ...
## $ center : Named num [1:20] 38.63 84.85 45.54 9.11 25.64 ...
## ..- attr(*, "names")= chr [1:20] "FGM" "FGA" "FG." "X3PM" ...
## $ scale : Named num [1:20] 2.1 3.54 1.52 2.58 7.05 ...
## ..- attr(*, "names")= chr [1:20] "FGM" "FGA" "FG." "X3PM" ...
## $ x : num [1:329, 1:20] -4.49 -4.58 -3.04 -2.73 -2.76 ...
## ..- attr(*, "dimnames")=List of 2
## .. ..$ : chr [1:329] "1" "2" "3" "4" ...
## .. ..$ : chr [1:20] "PC1" "PC2" "PC3" "PC4" ...
## - attr(*, "class")= chr "prcomp"
summary(results)
## Importance of components:
## PC1 PC2 PC3 PC4 PC5 PC6 PC7
## Standard deviation 2.3379 1.7940 1.6284 1.27391 1.20961 1.02591 0.95159
## Proportion of Variance 0.2733 0.1609 0.1326 0.08114 0.07316 0.05262 0.04528
## Cumulative Proportion 0.2733 0.4342 0.5668 0.64793 0.72109 0.77371 0.81899
## PC8 PC9 PC10 PC11 PC12 PC13 PC14
## Standard deviation 0.87373 0.84785 0.77118 0.68871 0.60276 0.5272 0.48104
## Proportion of Variance 0.03817 0.03594 0.02974 0.02372 0.01817 0.0139 0.01157
## Cumulative Proportion 0.85716 0.89310 0.92283 0.94655 0.96472 0.9786 0.99018
## PC15 PC16 PC17 PC18 PC19 PC20
## Standard deviation 0.39542 0.19296 0.03440 0.03100 0.02018 0.01493
## Proportion of Variance 0.00782 0.00186 0.00006 0.00005 0.00002 0.00001
## Cumulative Proportion 0.99800 0.99986 0.99992 0.99997 0.99999 1.00000
par(mfrow=c(1,1))
biplot(results, scale = 0)
#PCA output=> #1)FTM, FTA, and PFD are very similar variables. #2) 3PA, 3PM, DREB, FGM very similar. #3) BLK and STL also very similar, key. #In total, there are six observed principle components.
train_control <- trainControl(method = "LOOCV")
modelcv <- train(WIN. ~. -teamstatspk -TEAM -GP -W -L -MIN -PTS -SEASON -PFD, data = df,
method = "lm",
trControl = train_control)
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
summary(modelcv)
##
## Call:
## lm(formula = .outcome ~ ., data = dat)
##
## Residuals:
## ALL 329 residuals are 0: no residual degrees of freedom!
##
## Coefficients: (19 not defined because of singularities)
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.4311673 NaN NaN NaN
## FGM 0.5944847 NaN NaN NaN
## FGA -0.2565875 NaN NaN NaN
## FG. -0.4483804 NaN NaN NaN
## X3PM 0.1040710 NaN NaN NaN
## X3PA -0.0467215 NaN NaN NaN
## X3P. 0.0128754 NaN NaN NaN
## FTM -0.0102516 NaN NaN NaN
## FTA -0.0055537 NaN NaN NaN
## FT. -0.0158383 NaN NaN NaN
## OREB 0.1955374 NaN NaN NaN
## DREB 0.2260415 NaN NaN NaN
## REB -0.2342255 NaN NaN NaN
## AST 0.0030429 NaN NaN NaN
## TOV -0.0621965 NaN NaN NaN
## STL -0.0366246 NaN NaN NaN
## BLK 0.0879942 NaN NaN NaN
## BLKA 0.1646267 NaN NaN NaN
## PF -0.0408055 NaN NaN NaN
## X... 0.0211331 NaN NaN NaN
## `teamyearAtlanta Hawks2011-12` -0.2133474 NaN NaN NaN
## `teamyearAtlanta Hawks2012-13` -0.1517303 NaN NaN NaN
## `teamyearAtlanta Hawks2013-14` 0.1291764 NaN NaN NaN
## `teamyearAtlanta Hawks2014-15` -0.1187661 NaN NaN NaN
## `teamyearAtlanta Hawks2015-16` -0.0973143 NaN NaN NaN
## `teamyearAtlanta Hawks2016-17` 0.0005247 NaN NaN NaN
## `teamyearAtlanta Hawks2017-18` -0.1356691 NaN NaN NaN
## `teamyearAtlanta Hawks2018-19` 0.2577126 NaN NaN NaN
## `teamyearAtlanta Hawks2019-20` 0.1766134 NaN NaN NaN
## `teamyearAtlanta Hawks2020-21` -0.2826616 NaN NaN NaN
## `teamyearBoston Celtics2010-11` 0.0525077 NaN NaN NaN
## `teamyearBoston Celtics2011-12` -0.1862722 NaN NaN NaN
## `teamyearBoston Celtics2012-13` -0.0160660 NaN NaN NaN
## `teamyearBoston Celtics2013-14` 0.2698715 NaN NaN NaN
## `teamyearBoston Celtics2014-15` 0.1630440 NaN NaN NaN
## `teamyearBoston Celtics2015-16` 0.2601487 NaN NaN NaN
## `teamyearBoston Celtics2016-17` 0.1232531 NaN NaN NaN
## `teamyearBoston Celtics2017-18` 0.0537081 NaN NaN NaN
## `teamyearBoston Celtics2018-19` -0.0957987 NaN NaN NaN
## `teamyearBoston Celtics2019-20` -0.0896731 NaN NaN NaN
## `teamyearBoston Celtics2020-21` 0.0730948 NaN NaN NaN
## `teamyearBrooklyn Nets2012-13` 0.0477864 NaN NaN NaN
## `teamyearBrooklyn Nets2013-14` 0.2996191 NaN NaN NaN
## `teamyearBrooklyn Nets2014-15` 0.0938296 NaN NaN NaN
## `teamyearBrooklyn Nets2015-16` -0.2308554 NaN NaN NaN
## `teamyearBrooklyn Nets2016-17` 0.1374251 NaN NaN NaN
## `teamyearBrooklyn Nets2017-18` -0.0116496 NaN NaN NaN
## `teamyearBrooklyn Nets2018-19` 0.1638592 NaN NaN NaN
## `teamyearBrooklyn Nets2019-20` 0.1952864 NaN NaN NaN
## `teamyearBrooklyn Nets2020-21` -0.1735820 NaN NaN NaN
## `teamyearCharlotte Bobcats2010-11` -0.2413079 NaN NaN NaN
## `teamyearCharlotte Bobcats2011-12` -0.2757466 NaN NaN NaN
## `teamyearCharlotte Bobcats2012-13` -0.3880623 NaN NaN NaN
## `teamyearCharlotte Bobcats2013-14` -0.3664915 NaN NaN NaN
## `teamyearCharlotte Hornets2014-15` -0.2806684 NaN NaN NaN
## `teamyearCharlotte Hornets2015-16` -0.2235957 NaN NaN NaN
## `teamyearCharlotte Hornets2016-17` -0.3358521 NaN NaN NaN
## `teamyearCharlotte Hornets2017-18` -0.3121027 NaN NaN NaN
## `teamyearCharlotte Hornets2018-19` -0.2638473 NaN NaN NaN
## `teamyearCharlotte Hornets2019-20` 0.1000713 NaN NaN NaN
## `teamyearCharlotte Hornets2020-21` -0.1166541 NaN NaN NaN
## `teamyearChicago Bulls2010-11` -0.2075817 NaN NaN NaN
## `teamyearChicago Bulls2011-12` -0.3102177 NaN NaN NaN
## `teamyearChicago Bulls2012-13` -0.1227661 NaN NaN NaN
## `teamyearChicago Bulls2013-14` -0.1154258 NaN NaN NaN
## `teamyearChicago Bulls2014-15` -0.0962440 NaN NaN NaN
## `teamyearChicago Bulls2015-16` -0.3433810 NaN NaN NaN
## `teamyearChicago Bulls2016-17` 0.1131451 NaN NaN NaN
## `teamyearChicago Bulls2017-18` 0.0166194 NaN NaN NaN
## `teamyearChicago Bulls2018-19` -0.2521539 NaN NaN NaN
## `teamyearChicago Bulls2019-20` 0.0781278 NaN NaN NaN
## `teamyearChicago Bulls2020-21` -0.3511644 NaN NaN NaN
## `teamyearCleveland Cavaliers2010-11` -0.2159836 NaN NaN NaN
## `teamyearCleveland Cavaliers2011-12` -0.0242818 NaN NaN NaN
## `teamyearCleveland Cavaliers2012-13` -0.2311183 NaN NaN NaN
## `teamyearCleveland Cavaliers2013-14` -0.0208091 NaN NaN NaN
## `teamyearCleveland Cavaliers2014-15` 0.0310640 NaN NaN NaN
## `teamyearCleveland Cavaliers2015-16` 0.0554832 NaN NaN NaN
## `teamyearCleveland Cavaliers2016-17` -0.1637696 NaN NaN NaN
## `teamyearCleveland Cavaliers2017-18` -0.0633567 NaN NaN NaN
## `teamyearCleveland Cavaliers2018-19` 0.0276707 NaN NaN NaN
## `teamyearCleveland Cavaliers2019-20` -0.1781557 NaN NaN NaN
## `teamyearCleveland Cavaliers2020-21` -0.0185170 NaN NaN NaN
## `teamyearDallas Mavericks2010-11` 0.1830877 NaN NaN NaN
## `teamyearDallas Mavericks2011-12` 0.1619789 NaN NaN NaN
## `teamyearDallas Mavericks2012-13` -0.1187100 NaN NaN NaN
## `teamyearDallas Mavericks2013-14` 0.0769210 NaN NaN NaN
## `teamyearDallas Mavericks2014-15` 0.0860324 NaN NaN NaN
## `teamyearDallas Mavericks2015-16` 0.1338824 NaN NaN NaN
## `teamyearDallas Mavericks2016-17` 0.1236183 NaN NaN NaN
## `teamyearDallas Mavericks2017-18` -0.2086093 NaN NaN NaN
## `teamyearDallas Mavericks2018-19` 0.1820201 NaN NaN NaN
## `teamyearDallas Mavericks2019-20` -0.1286508 NaN NaN NaN
## `teamyearDallas Mavericks2020-21` 0.2418001 NaN NaN NaN
## `teamyearDenver Nuggets2010-11` -0.2582671 NaN NaN NaN
## `teamyearDenver Nuggets2011-12` -0.2747856 NaN NaN NaN
## `teamyearDenver Nuggets2012-13` -0.4075264 NaN NaN NaN
## `teamyearDenver Nuggets2013-14` 0.0259418 NaN NaN NaN
## `teamyearDenver Nuggets2014-15` 0.1217563 NaN NaN NaN
## `teamyearDenver Nuggets2015-16` -0.0390526 NaN NaN NaN
## `teamyearDenver Nuggets2016-17` -0.1162452 NaN NaN NaN
## `teamyearDenver Nuggets2017-18` -0.1435577 NaN NaN NaN
## `teamyearDenver Nuggets2018-19` -0.0534162 NaN NaN NaN
## `teamyearDenver Nuggets2019-20` -0.0223915 NaN NaN NaN
## `teamyearDenver Nuggets2020-21` -0.0879117 NaN NaN NaN
## `teamyearDetroit Pistons2010-11` -0.2819911 NaN NaN NaN
## `teamyearDetroit Pistons2011-12` 0.0384161 NaN NaN NaN
## `teamyearDetroit Pistons2012-13` -0.2849368 NaN NaN NaN
## `teamyearDetroit Pistons2013-14` 0.0616294 NaN NaN NaN
## `teamyearDetroit Pistons2014-15` -0.0894348 NaN NaN NaN
## `teamyearDetroit Pistons2015-16` 0.1169387 NaN NaN NaN
## `teamyearDetroit Pistons2016-17` -0.1381258 NaN NaN NaN
## `teamyearDetroit Pistons2017-18` -0.2234189 NaN NaN NaN
## `teamyearDetroit Pistons2018-19` 0.2686260 NaN NaN NaN
## `teamyearDetroit Pistons2019-20` -0.3144622 NaN NaN NaN
## `teamyearDetroit Pistons2020-21` 0.3734828 NaN NaN NaN
## `teamyearGolden State Warriors2010-11` -0.0721128 NaN NaN NaN
## `teamyearGolden State Warriors2011-12` -0.3843363 NaN NaN NaN
## `teamyearGolden State Warriors2012-13` -0.0131001 NaN NaN NaN
## `teamyearGolden State Warriors2013-14` 0.0205074 NaN NaN NaN
## `teamyearGolden State Warriors2014-15` -0.1479260 NaN NaN NaN
## `teamyearGolden State Warriors2015-16` -0.2394290 NaN NaN NaN
## `teamyearGolden State Warriors2016-17` -0.2729083 NaN NaN NaN
## `teamyearGolden State Warriors2017-18` -0.3566062 NaN NaN NaN
## `teamyearGolden State Warriors2018-19` -0.2277037 NaN NaN NaN
## `teamyearGolden State Warriors2019-20` 0.2396403 NaN NaN NaN
## `teamyearGolden State Warriors2020-21` 0.2742604 NaN NaN NaN
## `teamyearHouston Rockets2010-11` -0.1862883 NaN NaN NaN
## `teamyearHouston Rockets2011-12` -0.0407815 NaN NaN NaN
## `teamyearHouston Rockets2012-13` -0.0232152 NaN NaN NaN
## `teamyearHouston Rockets2013-14` 0.0239236 NaN NaN NaN
## `teamyearHouston Rockets2014-15` 0.4455376 NaN NaN NaN
## `teamyearHouston Rockets2015-16` 0.3322976 NaN NaN NaN
## `teamyearHouston Rockets2016-17` 0.2114200 NaN NaN NaN
## `teamyearHouston Rockets2017-18` 0.2847693 NaN NaN NaN
## `teamyearHouston Rockets2018-19` 0.3964746 NaN NaN NaN
## `teamyearHouston Rockets2019-20` 0.3906479 NaN NaN NaN
## `teamyearHouston Rockets2020-21` 0.0375321 NaN NaN NaN
## `teamyearIndiana Pacers2010-11` -0.0197963 NaN NaN NaN
## `teamyearIndiana Pacers2011-12` -0.0390898 NaN NaN NaN
## `teamyearIndiana Pacers2012-13` -0.0645802 NaN NaN NaN
## `teamyearIndiana Pacers2013-14` 0.1385260 NaN NaN NaN
## `teamyearIndiana Pacers2014-15` -0.0254794 NaN NaN NaN
## `teamyearIndiana Pacers2015-16` 0.1669373 NaN NaN NaN
## `teamyearIndiana Pacers2016-17` -0.2212116 NaN NaN NaN
## `teamyearIndiana Pacers2017-18` -0.3006089 NaN NaN NaN
## `teamyearIndiana Pacers2018-19` -0.4286275 NaN NaN NaN
## `teamyearIndiana Pacers2019-20` -0.3267538 NaN NaN NaN
## `teamyearIndiana Pacers2020-21` -0.0716799 NaN NaN NaN
## `teamyearLA Clippers2015-16` 0.0383930 NaN NaN NaN
## `teamyearLA Clippers2016-17` 0.0808312 NaN NaN NaN
## `teamyearLA Clippers2017-18` -0.2081139 NaN NaN NaN
## `teamyearLA Clippers2018-19` -0.2586835 NaN NaN NaN
## `teamyearLA Clippers2019-20` 0.1025060 NaN NaN NaN
## `teamyearLA Clippers2020-21` 0.0748300 NaN NaN NaN
## `teamyearLos Angeles Clippers2010-11` 0.0376014 NaN NaN NaN
## `teamyearLos Angeles Clippers2011-12` 0.0063288 NaN NaN NaN
## `teamyearLos Angeles Clippers2012-13` 0.0705054 NaN NaN NaN
## `teamyearLos Angeles Clippers2013-14` 0.2674938 NaN NaN NaN
## `teamyearLos Angeles Clippers2014-15` -0.0292556 NaN NaN NaN
## `teamyearLos Angeles Lakers2010-11` 0.0047425 NaN NaN NaN
## `teamyearLos Angeles Lakers2011-12` 0.0616037 NaN NaN NaN
## `teamyearLos Angeles Lakers2012-13` -0.0859838 NaN NaN NaN
## `teamyearLos Angeles Lakers2013-14` -0.2487057 NaN NaN NaN
## `teamyearLos Angeles Lakers2014-15` -0.0243193 NaN NaN NaN
## `teamyearLos Angeles Lakers2015-16` 0.2203009 NaN NaN NaN
## `teamyearLos Angeles Lakers2016-17` 0.0926612 NaN NaN NaN
## `teamyearLos Angeles Lakers2017-18` -0.0657267 NaN NaN NaN
## `teamyearLos Angeles Lakers2018-19` -0.2272627 NaN NaN NaN
## `teamyearLos Angeles Lakers2019-20` 0.0794400 NaN NaN NaN
## `teamyearLos Angeles Lakers2020-21` 0.0136196 NaN NaN NaN
## `teamyearMemphis Grizzlies2010-11` -0.3028562 NaN NaN NaN
## `teamyearMemphis Grizzlies2011-12` 0.0646447 NaN NaN NaN
## `teamyearMemphis Grizzlies2012-13` 0.0509500 NaN NaN NaN
## `teamyearMemphis Grizzlies2013-14` -0.2092255 NaN NaN NaN
## `teamyearMemphis Grizzlies2014-15` -0.0164236 NaN NaN NaN
## `teamyearMemphis Grizzlies2015-16` 0.1229993 NaN NaN NaN
## `teamyearMemphis Grizzlies2016-17` 0.1932017 NaN NaN NaN
## `teamyearMemphis Grizzlies2017-18` 0.0976579 NaN NaN NaN
## `teamyearMemphis Grizzlies2018-19` -0.0004045 NaN NaN NaN
## `teamyearMemphis Grizzlies2019-20` -0.1530269 NaN NaN NaN
## `teamyearMemphis Grizzlies2020-21` -0.2854307 NaN NaN NaN
## `teamyearMiami Heat2010-11` 0.2188244 NaN NaN NaN
## `teamyearMiami Heat2011-12` 0.1147427 NaN NaN NaN
## `teamyearMiami Heat2012-13` 0.0360935 NaN NaN NaN
## `teamyearMiami Heat2013-14` 0.3153462 NaN NaN NaN
## `teamyearMiami Heat2014-15` 0.1323170 NaN NaN NaN
## `teamyearMiami Heat2015-16` -0.1974427 NaN NaN NaN
## `teamyearMiami Heat2016-17` -0.3265476 NaN NaN NaN
## `teamyearMiami Heat2017-18` -0.0652167 NaN NaN NaN
## `teamyearMiami Heat2018-19` -0.0368395 NaN NaN NaN
## `teamyearMiami Heat2019-20` 0.1369537 NaN NaN NaN
## `teamyearMiami Heat2020-21` 0.3305389 NaN NaN NaN
## `teamyearMilwaukee Bucks2010-11` -0.0192112 NaN NaN NaN
## `teamyearMilwaukee Bucks2011-12` 0.0656326 NaN NaN NaN
## `teamyearMilwaukee Bucks2012-13` -0.0304368 NaN NaN NaN
## `teamyearMilwaukee Bucks2013-14` -0.1239004 NaN NaN NaN
## `teamyearMilwaukee Bucks2014-15` 0.1793413 NaN NaN NaN
## `teamyearMilwaukee Bucks2015-16` -0.2822463 NaN NaN NaN
## `teamyearMilwaukee Bucks2016-17` -0.1875440 NaN NaN NaN
## `teamyearMilwaukee Bucks2017-18` -0.0940915 NaN NaN NaN
## `teamyearMilwaukee Bucks2018-19` -0.2669620 NaN NaN NaN
## `teamyearMilwaukee Bucks2019-20` -0.1511399 NaN NaN NaN
## `teamyearMilwaukee Bucks2020-21` 0.0449801 NaN NaN NaN
## `teamyearMinnesota Timberwolves2011-12` -0.0321972 NaN NaN NaN
## `teamyearMinnesota Timberwolves2012-13` -0.1045819 NaN NaN NaN
## `teamyearMinnesota Timberwolves2013-14` 0.0159274 NaN NaN NaN
## `teamyearMinnesota Timberwolves2014-15` 0.0013414 NaN NaN NaN
## `teamyearMinnesota Timberwolves2015-16` 0.0392003 NaN NaN NaN
## `teamyearMinnesota Timberwolves2016-17` -0.1594390 NaN NaN NaN
## `teamyearMinnesota Timberwolves2017-18` -0.1824130 NaN NaN NaN
## `teamyearMinnesota Timberwolves2018-19` -0.1651737 NaN NaN NaN
## `teamyearMinnesota Timberwolves2019-20` 0.1350711 NaN NaN NaN
## `teamyearMinnesota Timberwolves2020-21` 0.1376349 NaN NaN NaN
## `teamyearNew Jersey Nets2010-11` -0.0249416 NaN NaN NaN
## `teamyearNew Jersey Nets2011-12` 0.1448652 NaN NaN NaN
## `teamyearNew Orleans Hornets2010-11` -0.0517185 NaN NaN NaN
## `teamyearNew Orleans Hornets2011-12` -0.2029854 NaN NaN NaN
## `teamyearNew Orleans Hornets2012-13` -0.3632581 NaN NaN NaN
## `teamyearNew Orleans Pelicans2013-14` -0.3706200 NaN NaN NaN
## `teamyearNew Orleans Pelicans2014-15` -0.5277538 NaN NaN NaN
## `teamyearNew Orleans Pelicans2015-16` -0.1475548 NaN NaN NaN
## `teamyearNew Orleans Pelicans2016-17` -0.2038947 NaN NaN NaN
## `teamyearNew Orleans Pelicans2017-18` -0.3160176 NaN NaN NaN
## `teamyearNew Orleans Pelicans2018-19` -0.3831455 NaN NaN NaN
## `teamyearNew Orleans Pelicans2019-20` -0.0992951 NaN NaN NaN
## `teamyearNew Orleans Pelicans2020-21` 0.3039977 NaN NaN NaN
## `teamyearNew York Knicks2010-11` 0.0096927 NaN NaN NaN
## `teamyearNew York Knicks2011-12` 0.2958145 NaN NaN NaN
## `teamyearNew York Knicks2012-13` 0.1780819 NaN NaN NaN
## `teamyearNew York Knicks2013-14` 0.1470158 NaN NaN NaN
## `teamyearNew York Knicks2014-15` 0.0988409 NaN NaN NaN
## `teamyearNew York Knicks2015-16` -0.0529927 NaN NaN NaN
## `teamyearNew York Knicks2016-17` -0.0383117 NaN NaN NaN
## `teamyearNew York Knicks2017-18` -0.2417296 NaN NaN NaN
## `teamyearNew York Knicks2018-19` -0.0429831 NaN NaN NaN
## `teamyearNew York Knicks2019-20` 0.0076647 NaN NaN NaN
## `teamyearNew York Knicks2020-21` 0.0674672 NaN NaN NaN
## `teamyearOklahoma City Thunder2010-11` 0.3437169 NaN NaN NaN
## `teamyearOklahoma City Thunder2011-12` 0.0174791 NaN NaN NaN
## `teamyearOklahoma City Thunder2012-13` 0.0981463 NaN NaN NaN
## `teamyearOklahoma City Thunder2013-14` 0.3516530 NaN NaN NaN
## `teamyearOklahoma City Thunder2014-15` 0.2311675 NaN NaN NaN
## `teamyearOklahoma City Thunder2015-16` 0.0842381 NaN NaN NaN
## `teamyearOklahoma City Thunder2016-17` 0.1849052 NaN NaN NaN
## `teamyearOklahoma City Thunder2017-18` 0.0924273 NaN NaN NaN
## `teamyearOklahoma City Thunder2018-19` 0.1199002 NaN NaN NaN
## `teamyearOklahoma City Thunder2019-20` 0.0859089 NaN NaN NaN
## `teamyearOklahoma City Thunder2020-21` 0.1665207 NaN NaN NaN
## `teamyearOrlando Magic2010-11` 0.1488832 NaN NaN NaN
## `teamyearOrlando Magic2011-12` -0.0094997 NaN NaN NaN
## `teamyearOrlando Magic2012-13` -0.2636130 NaN NaN NaN
## `teamyearOrlando Magic2013-14` -0.2438058 NaN NaN NaN
## `teamyearOrlando Magic2014-15` -0.1520313 NaN NaN NaN
## `teamyearOrlando Magic2015-16` -0.2736652 NaN NaN NaN
## `teamyearOrlando Magic2016-17` -0.0557277 NaN NaN NaN
## `teamyearOrlando Magic2017-18` -0.1986977 NaN NaN NaN
## `teamyearOrlando Magic2018-19` -0.1576080 NaN NaN NaN
## `teamyearOrlando Magic2019-20` -0.0231618 NaN NaN NaN
## `teamyearOrlando Magic2020-21` 0.0528544 NaN NaN NaN
## `teamyearPhiladelphia 76ers2010-11` -0.2005945 NaN NaN NaN
## `teamyearPhiladelphia 76ers2011-12` -0.5374403 NaN NaN NaN
## `teamyearPhiladelphia 76ers2012-13` -0.3344300 NaN NaN NaN
## `teamyearPhiladelphia 76ers2013-14` 0.1691921 NaN NaN NaN
## `teamyearPhiladelphia 76ers2014-15` 0.3310643 NaN NaN NaN
## `teamyearPhiladelphia 76ers2015-16` -0.1871739 NaN NaN NaN
## `teamyearPhiladelphia 76ers2016-17` 0.2235636 NaN NaN NaN
## `teamyearPhiladelphia 76ers2017-18` 0.0837884 NaN NaN NaN
## `teamyearPhiladelphia 76ers2018-19` 0.1957846 NaN NaN NaN
## `teamyearPhiladelphia 76ers2019-20` -0.0042761 NaN NaN NaN
## `teamyearPhiladelphia 76ers2020-21` -0.1593981 NaN NaN NaN
## `teamyearPhoenix Suns2010-11` -0.1585045 NaN NaN NaN
## `teamyearPhoenix Suns2011-12` -0.1615403 NaN NaN NaN
## `teamyearPhoenix Suns2012-13` 0.0091653 NaN NaN NaN
## `teamyearPhoenix Suns2013-14` 0.2570906 NaN NaN NaN
## `teamyearPhoenix Suns2014-15` 0.2937425 NaN NaN NaN
## `teamyearPhoenix Suns2015-16` 0.3551474 NaN NaN NaN
## `teamyearPhoenix Suns2016-17` 0.2155744 NaN NaN NaN
## `teamyearPhoenix Suns2017-18` 0.0273122 NaN NaN NaN
## `teamyearPhoenix Suns2018-19` 0.1779865 NaN NaN NaN
## `teamyearPhoenix Suns2019-20` 0.0152782 NaN NaN NaN
## `teamyearPhoenix Suns2020-21` 0.0423756 NaN NaN NaN
## `teamyearPortland Trail Blazers2010-11` 0.2092400 NaN NaN NaN
## `teamyearPortland Trail Blazers2011-12` -0.0036266 NaN NaN NaN
## `teamyearPortland Trail Blazers2012-13` -0.0156736 NaN NaN NaN
## `teamyearPortland Trail Blazers2013-14` 0.2232786 NaN NaN NaN
## `teamyearPortland Trail Blazers2014-15` 0.1515900 NaN NaN NaN
## `teamyearPortland Trail Blazers2015-16` 0.0693791 NaN NaN NaN
## `teamyearPortland Trail Blazers2016-17` -0.1590403 NaN NaN NaN
## `teamyearPortland Trail Blazers2017-18` -0.1186725 NaN NaN NaN
## `teamyearPortland Trail Blazers2018-19` -0.0543219 NaN NaN NaN
## `teamyearPortland Trail Blazers2019-20` -0.3304231 NaN NaN NaN
## `teamyearPortland Trail Blazers2020-21` 0.1061964 NaN NaN NaN
## `teamyearSacramento Kings2010-11` -0.0266905 NaN NaN NaN
## `teamyearSacramento Kings2011-12` -0.0884379 NaN NaN NaN
## `teamyearSacramento Kings2012-13` -0.1734128 NaN NaN NaN
## `teamyearSacramento Kings2013-14` 0.1373627 NaN NaN NaN
## `teamyearSacramento Kings2014-15` 0.0022786 NaN NaN NaN
## `teamyearSacramento Kings2015-16` -0.0649962 NaN NaN NaN
## `teamyearSacramento Kings2016-17` -0.1361554 NaN NaN NaN
## `teamyearSacramento Kings2017-18` -0.2879962 NaN NaN NaN
## `teamyearSacramento Kings2018-19` -0.3274601 NaN NaN NaN
## `teamyearSacramento Kings2019-20` 0.0682753 NaN NaN NaN
## `teamyearSacramento Kings2020-21` -0.1353800 NaN NaN NaN
## `teamyearSan Antonio Spurs2010-11` -0.1378908 NaN NaN NaN
## `teamyearSan Antonio Spurs2011-12` -0.3725494 NaN NaN NaN
## `teamyearSan Antonio Spurs2012-13` -0.2709374 NaN NaN NaN
## `teamyearSan Antonio Spurs2013-14` -0.3735822 NaN NaN NaN
## `teamyearSan Antonio Spurs2014-15` -0.1351501 NaN NaN NaN
## `teamyearSan Antonio Spurs2015-16` -0.2549308 NaN NaN NaN
## `teamyearSan Antonio Spurs2016-17` -0.2242326 NaN NaN NaN
## `teamyearSan Antonio Spurs2017-18` -0.1579713 NaN NaN NaN
## `teamyearSan Antonio Spurs2018-19` -0.4623336 NaN NaN NaN
## `teamyearSan Antonio Spurs2019-20` -0.3849894 NaN NaN NaN
## `teamyearSan Antonio Spurs2020-21` -0.6439997 NaN NaN NaN
## `teamyearToronto Raptors2010-11` -0.1208131 NaN NaN NaN
## `teamyearToronto Raptors2011-12` 0.0582151 NaN NaN NaN
## `teamyearToronto Raptors2012-13` 0.1003347 NaN NaN NaN
## `teamyearToronto Raptors2013-14` 0.2681983 NaN NaN NaN
## `teamyearToronto Raptors2014-15` 0.0421980 NaN NaN NaN
## `teamyearToronto Raptors2015-16` -0.1275942 NaN NaN NaN
## `teamyearToronto Raptors2016-17` -0.0236250 NaN NaN NaN
## `teamyearToronto Raptors2017-18` -0.1911882 NaN NaN NaN
## `teamyearToronto Raptors2018-19` -0.0207293 NaN NaN NaN
## `teamyearToronto Raptors2019-20` 0.1231172 NaN NaN NaN
## `teamyearToronto Raptors2020-21` 0.0858739 NaN NaN NaN
## `teamyearUtah Jazz2010-11` -0.0513341 NaN NaN NaN
## `teamyearUtah Jazz2011-12` -0.0314443 NaN NaN NaN
## `teamyearUtah Jazz2012-13` -0.2320123 NaN NaN NaN
## `teamyearUtah Jazz2013-14` NA NA NA NA
## `teamyearUtah Jazz2014-15` NA NA NA NA
## `teamyearUtah Jazz2015-16` NA NA NA NA
## `teamyearUtah Jazz2016-17` NA NA NA NA
## `teamyearUtah Jazz2017-18` NA NA NA NA
## `teamyearUtah Jazz2018-19` NA NA NA NA
## `teamyearUtah Jazz2019-20` NA NA NA NA
## `teamyearUtah Jazz2020-21` NA NA NA NA
## `teamyearWashington Wizards2010-11` NA NA NA NA
## `teamyearWashington Wizards2011-12` NA NA NA NA
## `teamyearWashington Wizards2012-13` NA NA NA NA
## `teamyearWashington Wizards2013-14` NA NA NA NA
## `teamyearWashington Wizards2014-15` NA NA NA NA
## `teamyearWashington Wizards2015-16` NA NA NA NA
## `teamyearWashington Wizards2016-17` NA NA NA NA
## `teamyearWashington Wizards2017-18` NA NA NA NA
## `teamyearWashington Wizards2018-19` NA NA NA NA
## `teamyearWashington Wizards2019-20` NA NA NA NA
## `teamyearWashington Wizards2020-21` NA NA NA NA
##
## Residual standard error: NaN on 0 degrees of freedom
## Multiple R-squared: 1, Adjusted R-squared: NaN
## F-statistic: NaN on 328 and 0 DF, p-value: NA
print(modelcv)
## Linear Regression
##
## 329 samples
## 29 predictor
##
## No pre-processing
## Resampling: Leave-One-Out Cross-Validation
## Summary of sample sizes: 328, 328, 328, 328, 328, 328, ...
## Resampling results:
##
## RMSE Rsquared MAE
## 0.2424977 0.2549917 0.1779569
##
## Tuning parameter 'intercept' was held constant at a value of TRUE
#1) LOOCV: RMSE=0.2424977 Rsquared=0.2549917 MAE=0.1779569
set.seed(125)
train_control <- trainControl(method = "cv",number = 10)
modelkfold <- train(WIN. ~.-teamstatspk -TEAM -GP -W -L -MIN -PTS -SEASON -PFD, data = df,
method = "lm",
trControl = train_control)
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
summary(modelkfold)
##
## Call:
## lm(formula = .outcome ~ ., data = dat)
##
## Residuals:
## ALL 329 residuals are 0: no residual degrees of freedom!
##
## Coefficients: (19 not defined because of singularities)
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.4311673 NaN NaN NaN
## FGM 0.5944847 NaN NaN NaN
## FGA -0.2565875 NaN NaN NaN
## FG. -0.4483804 NaN NaN NaN
## X3PM 0.1040710 NaN NaN NaN
## X3PA -0.0467215 NaN NaN NaN
## X3P. 0.0128754 NaN NaN NaN
## FTM -0.0102516 NaN NaN NaN
## FTA -0.0055537 NaN NaN NaN
## FT. -0.0158383 NaN NaN NaN
## OREB 0.1955374 NaN NaN NaN
## DREB 0.2260415 NaN NaN NaN
## REB -0.2342255 NaN NaN NaN
## AST 0.0030429 NaN NaN NaN
## TOV -0.0621965 NaN NaN NaN
## STL -0.0366246 NaN NaN NaN
## BLK 0.0879942 NaN NaN NaN
## BLKA 0.1646267 NaN NaN NaN
## PF -0.0408055 NaN NaN NaN
## X... 0.0211331 NaN NaN NaN
## `teamyearAtlanta Hawks2011-12` -0.2133474 NaN NaN NaN
## `teamyearAtlanta Hawks2012-13` -0.1517303 NaN NaN NaN
## `teamyearAtlanta Hawks2013-14` 0.1291764 NaN NaN NaN
## `teamyearAtlanta Hawks2014-15` -0.1187661 NaN NaN NaN
## `teamyearAtlanta Hawks2015-16` -0.0973143 NaN NaN NaN
## `teamyearAtlanta Hawks2016-17` 0.0005247 NaN NaN NaN
## `teamyearAtlanta Hawks2017-18` -0.1356691 NaN NaN NaN
## `teamyearAtlanta Hawks2018-19` 0.2577126 NaN NaN NaN
## `teamyearAtlanta Hawks2019-20` 0.1766134 NaN NaN NaN
## `teamyearAtlanta Hawks2020-21` -0.2826616 NaN NaN NaN
## `teamyearBoston Celtics2010-11` 0.0525077 NaN NaN NaN
## `teamyearBoston Celtics2011-12` -0.1862722 NaN NaN NaN
## `teamyearBoston Celtics2012-13` -0.0160660 NaN NaN NaN
## `teamyearBoston Celtics2013-14` 0.2698715 NaN NaN NaN
## `teamyearBoston Celtics2014-15` 0.1630440 NaN NaN NaN
## `teamyearBoston Celtics2015-16` 0.2601487 NaN NaN NaN
## `teamyearBoston Celtics2016-17` 0.1232531 NaN NaN NaN
## `teamyearBoston Celtics2017-18` 0.0537081 NaN NaN NaN
## `teamyearBoston Celtics2018-19` -0.0957987 NaN NaN NaN
## `teamyearBoston Celtics2019-20` -0.0896731 NaN NaN NaN
## `teamyearBoston Celtics2020-21` 0.0730948 NaN NaN NaN
## `teamyearBrooklyn Nets2012-13` 0.0477864 NaN NaN NaN
## `teamyearBrooklyn Nets2013-14` 0.2996191 NaN NaN NaN
## `teamyearBrooklyn Nets2014-15` 0.0938296 NaN NaN NaN
## `teamyearBrooklyn Nets2015-16` -0.2308554 NaN NaN NaN
## `teamyearBrooklyn Nets2016-17` 0.1374251 NaN NaN NaN
## `teamyearBrooklyn Nets2017-18` -0.0116496 NaN NaN NaN
## `teamyearBrooklyn Nets2018-19` 0.1638592 NaN NaN NaN
## `teamyearBrooklyn Nets2019-20` 0.1952864 NaN NaN NaN
## `teamyearBrooklyn Nets2020-21` -0.1735820 NaN NaN NaN
## `teamyearCharlotte Bobcats2010-11` -0.2413079 NaN NaN NaN
## `teamyearCharlotte Bobcats2011-12` -0.2757466 NaN NaN NaN
## `teamyearCharlotte Bobcats2012-13` -0.3880623 NaN NaN NaN
## `teamyearCharlotte Bobcats2013-14` -0.3664915 NaN NaN NaN
## `teamyearCharlotte Hornets2014-15` -0.2806684 NaN NaN NaN
## `teamyearCharlotte Hornets2015-16` -0.2235957 NaN NaN NaN
## `teamyearCharlotte Hornets2016-17` -0.3358521 NaN NaN NaN
## `teamyearCharlotte Hornets2017-18` -0.3121027 NaN NaN NaN
## `teamyearCharlotte Hornets2018-19` -0.2638473 NaN NaN NaN
## `teamyearCharlotte Hornets2019-20` 0.1000713 NaN NaN NaN
## `teamyearCharlotte Hornets2020-21` -0.1166541 NaN NaN NaN
## `teamyearChicago Bulls2010-11` -0.2075817 NaN NaN NaN
## `teamyearChicago Bulls2011-12` -0.3102177 NaN NaN NaN
## `teamyearChicago Bulls2012-13` -0.1227661 NaN NaN NaN
## `teamyearChicago Bulls2013-14` -0.1154258 NaN NaN NaN
## `teamyearChicago Bulls2014-15` -0.0962440 NaN NaN NaN
## `teamyearChicago Bulls2015-16` -0.3433810 NaN NaN NaN
## `teamyearChicago Bulls2016-17` 0.1131451 NaN NaN NaN
## `teamyearChicago Bulls2017-18` 0.0166194 NaN NaN NaN
## `teamyearChicago Bulls2018-19` -0.2521539 NaN NaN NaN
## `teamyearChicago Bulls2019-20` 0.0781278 NaN NaN NaN
## `teamyearChicago Bulls2020-21` -0.3511644 NaN NaN NaN
## `teamyearCleveland Cavaliers2010-11` -0.2159836 NaN NaN NaN
## `teamyearCleveland Cavaliers2011-12` -0.0242818 NaN NaN NaN
## `teamyearCleveland Cavaliers2012-13` -0.2311183 NaN NaN NaN
## `teamyearCleveland Cavaliers2013-14` -0.0208091 NaN NaN NaN
## `teamyearCleveland Cavaliers2014-15` 0.0310640 NaN NaN NaN
## `teamyearCleveland Cavaliers2015-16` 0.0554832 NaN NaN NaN
## `teamyearCleveland Cavaliers2016-17` -0.1637696 NaN NaN NaN
## `teamyearCleveland Cavaliers2017-18` -0.0633567 NaN NaN NaN
## `teamyearCleveland Cavaliers2018-19` 0.0276707 NaN NaN NaN
## `teamyearCleveland Cavaliers2019-20` -0.1781557 NaN NaN NaN
## `teamyearCleveland Cavaliers2020-21` -0.0185170 NaN NaN NaN
## `teamyearDallas Mavericks2010-11` 0.1830877 NaN NaN NaN
## `teamyearDallas Mavericks2011-12` 0.1619789 NaN NaN NaN
## `teamyearDallas Mavericks2012-13` -0.1187100 NaN NaN NaN
## `teamyearDallas Mavericks2013-14` 0.0769210 NaN NaN NaN
## `teamyearDallas Mavericks2014-15` 0.0860324 NaN NaN NaN
## `teamyearDallas Mavericks2015-16` 0.1338824 NaN NaN NaN
## `teamyearDallas Mavericks2016-17` 0.1236183 NaN NaN NaN
## `teamyearDallas Mavericks2017-18` -0.2086093 NaN NaN NaN
## `teamyearDallas Mavericks2018-19` 0.1820201 NaN NaN NaN
## `teamyearDallas Mavericks2019-20` -0.1286508 NaN NaN NaN
## `teamyearDallas Mavericks2020-21` 0.2418001 NaN NaN NaN
## `teamyearDenver Nuggets2010-11` -0.2582671 NaN NaN NaN
## `teamyearDenver Nuggets2011-12` -0.2747856 NaN NaN NaN
## `teamyearDenver Nuggets2012-13` -0.4075264 NaN NaN NaN
## `teamyearDenver Nuggets2013-14` 0.0259418 NaN NaN NaN
## `teamyearDenver Nuggets2014-15` 0.1217563 NaN NaN NaN
## `teamyearDenver Nuggets2015-16` -0.0390526 NaN NaN NaN
## `teamyearDenver Nuggets2016-17` -0.1162452 NaN NaN NaN
## `teamyearDenver Nuggets2017-18` -0.1435577 NaN NaN NaN
## `teamyearDenver Nuggets2018-19` -0.0534162 NaN NaN NaN
## `teamyearDenver Nuggets2019-20` -0.0223915 NaN NaN NaN
## `teamyearDenver Nuggets2020-21` -0.0879117 NaN NaN NaN
## `teamyearDetroit Pistons2010-11` -0.2819911 NaN NaN NaN
## `teamyearDetroit Pistons2011-12` 0.0384161 NaN NaN NaN
## `teamyearDetroit Pistons2012-13` -0.2849368 NaN NaN NaN
## `teamyearDetroit Pistons2013-14` 0.0616294 NaN NaN NaN
## `teamyearDetroit Pistons2014-15` -0.0894348 NaN NaN NaN
## `teamyearDetroit Pistons2015-16` 0.1169387 NaN NaN NaN
## `teamyearDetroit Pistons2016-17` -0.1381258 NaN NaN NaN
## `teamyearDetroit Pistons2017-18` -0.2234189 NaN NaN NaN
## `teamyearDetroit Pistons2018-19` 0.2686260 NaN NaN NaN
## `teamyearDetroit Pistons2019-20` -0.3144622 NaN NaN NaN
## `teamyearDetroit Pistons2020-21` 0.3734828 NaN NaN NaN
## `teamyearGolden State Warriors2010-11` -0.0721128 NaN NaN NaN
## `teamyearGolden State Warriors2011-12` -0.3843363 NaN NaN NaN
## `teamyearGolden State Warriors2012-13` -0.0131001 NaN NaN NaN
## `teamyearGolden State Warriors2013-14` 0.0205074 NaN NaN NaN
## `teamyearGolden State Warriors2014-15` -0.1479260 NaN NaN NaN
## `teamyearGolden State Warriors2015-16` -0.2394290 NaN NaN NaN
## `teamyearGolden State Warriors2016-17` -0.2729083 NaN NaN NaN
## `teamyearGolden State Warriors2017-18` -0.3566062 NaN NaN NaN
## `teamyearGolden State Warriors2018-19` -0.2277037 NaN NaN NaN
## `teamyearGolden State Warriors2019-20` 0.2396403 NaN NaN NaN
## `teamyearGolden State Warriors2020-21` 0.2742604 NaN NaN NaN
## `teamyearHouston Rockets2010-11` -0.1862883 NaN NaN NaN
## `teamyearHouston Rockets2011-12` -0.0407815 NaN NaN NaN
## `teamyearHouston Rockets2012-13` -0.0232152 NaN NaN NaN
## `teamyearHouston Rockets2013-14` 0.0239236 NaN NaN NaN
## `teamyearHouston Rockets2014-15` 0.4455376 NaN NaN NaN
## `teamyearHouston Rockets2015-16` 0.3322976 NaN NaN NaN
## `teamyearHouston Rockets2016-17` 0.2114200 NaN NaN NaN
## `teamyearHouston Rockets2017-18` 0.2847693 NaN NaN NaN
## `teamyearHouston Rockets2018-19` 0.3964746 NaN NaN NaN
## `teamyearHouston Rockets2019-20` 0.3906479 NaN NaN NaN
## `teamyearHouston Rockets2020-21` 0.0375321 NaN NaN NaN
## `teamyearIndiana Pacers2010-11` -0.0197963 NaN NaN NaN
## `teamyearIndiana Pacers2011-12` -0.0390898 NaN NaN NaN
## `teamyearIndiana Pacers2012-13` -0.0645802 NaN NaN NaN
## `teamyearIndiana Pacers2013-14` 0.1385260 NaN NaN NaN
## `teamyearIndiana Pacers2014-15` -0.0254794 NaN NaN NaN
## `teamyearIndiana Pacers2015-16` 0.1669373 NaN NaN NaN
## `teamyearIndiana Pacers2016-17` -0.2212116 NaN NaN NaN
## `teamyearIndiana Pacers2017-18` -0.3006089 NaN NaN NaN
## `teamyearIndiana Pacers2018-19` -0.4286275 NaN NaN NaN
## `teamyearIndiana Pacers2019-20` -0.3267538 NaN NaN NaN
## `teamyearIndiana Pacers2020-21` -0.0716799 NaN NaN NaN
## `teamyearLA Clippers2015-16` 0.0383930 NaN NaN NaN
## `teamyearLA Clippers2016-17` 0.0808312 NaN NaN NaN
## `teamyearLA Clippers2017-18` -0.2081139 NaN NaN NaN
## `teamyearLA Clippers2018-19` -0.2586835 NaN NaN NaN
## `teamyearLA Clippers2019-20` 0.1025060 NaN NaN NaN
## `teamyearLA Clippers2020-21` 0.0748300 NaN NaN NaN
## `teamyearLos Angeles Clippers2010-11` 0.0376014 NaN NaN NaN
## `teamyearLos Angeles Clippers2011-12` 0.0063288 NaN NaN NaN
## `teamyearLos Angeles Clippers2012-13` 0.0705054 NaN NaN NaN
## `teamyearLos Angeles Clippers2013-14` 0.2674938 NaN NaN NaN
## `teamyearLos Angeles Clippers2014-15` -0.0292556 NaN NaN NaN
## `teamyearLos Angeles Lakers2010-11` 0.0047425 NaN NaN NaN
## `teamyearLos Angeles Lakers2011-12` 0.0616037 NaN NaN NaN
## `teamyearLos Angeles Lakers2012-13` -0.0859838 NaN NaN NaN
## `teamyearLos Angeles Lakers2013-14` -0.2487057 NaN NaN NaN
## `teamyearLos Angeles Lakers2014-15` -0.0243193 NaN NaN NaN
## `teamyearLos Angeles Lakers2015-16` 0.2203009 NaN NaN NaN
## `teamyearLos Angeles Lakers2016-17` 0.0926612 NaN NaN NaN
## `teamyearLos Angeles Lakers2017-18` -0.0657267 NaN NaN NaN
## `teamyearLos Angeles Lakers2018-19` -0.2272627 NaN NaN NaN
## `teamyearLos Angeles Lakers2019-20` 0.0794400 NaN NaN NaN
## `teamyearLos Angeles Lakers2020-21` 0.0136196 NaN NaN NaN
## `teamyearMemphis Grizzlies2010-11` -0.3028562 NaN NaN NaN
## `teamyearMemphis Grizzlies2011-12` 0.0646447 NaN NaN NaN
## `teamyearMemphis Grizzlies2012-13` 0.0509500 NaN NaN NaN
## `teamyearMemphis Grizzlies2013-14` -0.2092255 NaN NaN NaN
## `teamyearMemphis Grizzlies2014-15` -0.0164236 NaN NaN NaN
## `teamyearMemphis Grizzlies2015-16` 0.1229993 NaN NaN NaN
## `teamyearMemphis Grizzlies2016-17` 0.1932017 NaN NaN NaN
## `teamyearMemphis Grizzlies2017-18` 0.0976579 NaN NaN NaN
## `teamyearMemphis Grizzlies2018-19` -0.0004045 NaN NaN NaN
## `teamyearMemphis Grizzlies2019-20` -0.1530269 NaN NaN NaN
## `teamyearMemphis Grizzlies2020-21` -0.2854307 NaN NaN NaN
## `teamyearMiami Heat2010-11` 0.2188244 NaN NaN NaN
## `teamyearMiami Heat2011-12` 0.1147427 NaN NaN NaN
## `teamyearMiami Heat2012-13` 0.0360935 NaN NaN NaN
## `teamyearMiami Heat2013-14` 0.3153462 NaN NaN NaN
## `teamyearMiami Heat2014-15` 0.1323170 NaN NaN NaN
## `teamyearMiami Heat2015-16` -0.1974427 NaN NaN NaN
## `teamyearMiami Heat2016-17` -0.3265476 NaN NaN NaN
## `teamyearMiami Heat2017-18` -0.0652167 NaN NaN NaN
## `teamyearMiami Heat2018-19` -0.0368395 NaN NaN NaN
## `teamyearMiami Heat2019-20` 0.1369537 NaN NaN NaN
## `teamyearMiami Heat2020-21` 0.3305389 NaN NaN NaN
## `teamyearMilwaukee Bucks2010-11` -0.0192112 NaN NaN NaN
## `teamyearMilwaukee Bucks2011-12` 0.0656326 NaN NaN NaN
## `teamyearMilwaukee Bucks2012-13` -0.0304368 NaN NaN NaN
## `teamyearMilwaukee Bucks2013-14` -0.1239004 NaN NaN NaN
## `teamyearMilwaukee Bucks2014-15` 0.1793413 NaN NaN NaN
## `teamyearMilwaukee Bucks2015-16` -0.2822463 NaN NaN NaN
## `teamyearMilwaukee Bucks2016-17` -0.1875440 NaN NaN NaN
## `teamyearMilwaukee Bucks2017-18` -0.0940915 NaN NaN NaN
## `teamyearMilwaukee Bucks2018-19` -0.2669620 NaN NaN NaN
## `teamyearMilwaukee Bucks2019-20` -0.1511399 NaN NaN NaN
## `teamyearMilwaukee Bucks2020-21` 0.0449801 NaN NaN NaN
## `teamyearMinnesota Timberwolves2011-12` -0.0321972 NaN NaN NaN
## `teamyearMinnesota Timberwolves2012-13` -0.1045819 NaN NaN NaN
## `teamyearMinnesota Timberwolves2013-14` 0.0159274 NaN NaN NaN
## `teamyearMinnesota Timberwolves2014-15` 0.0013414 NaN NaN NaN
## `teamyearMinnesota Timberwolves2015-16` 0.0392003 NaN NaN NaN
## `teamyearMinnesota Timberwolves2016-17` -0.1594390 NaN NaN NaN
## `teamyearMinnesota Timberwolves2017-18` -0.1824130 NaN NaN NaN
## `teamyearMinnesota Timberwolves2018-19` -0.1651737 NaN NaN NaN
## `teamyearMinnesota Timberwolves2019-20` 0.1350711 NaN NaN NaN
## `teamyearMinnesota Timberwolves2020-21` 0.1376349 NaN NaN NaN
## `teamyearNew Jersey Nets2010-11` -0.0249416 NaN NaN NaN
## `teamyearNew Jersey Nets2011-12` 0.1448652 NaN NaN NaN
## `teamyearNew Orleans Hornets2010-11` -0.0517185 NaN NaN NaN
## `teamyearNew Orleans Hornets2011-12` -0.2029854 NaN NaN NaN
## `teamyearNew Orleans Hornets2012-13` -0.3632581 NaN NaN NaN
## `teamyearNew Orleans Pelicans2013-14` -0.3706200 NaN NaN NaN
## `teamyearNew Orleans Pelicans2014-15` -0.5277538 NaN NaN NaN
## `teamyearNew Orleans Pelicans2015-16` -0.1475548 NaN NaN NaN
## `teamyearNew Orleans Pelicans2016-17` -0.2038947 NaN NaN NaN
## `teamyearNew Orleans Pelicans2017-18` -0.3160176 NaN NaN NaN
## `teamyearNew Orleans Pelicans2018-19` -0.3831455 NaN NaN NaN
## `teamyearNew Orleans Pelicans2019-20` -0.0992951 NaN NaN NaN
## `teamyearNew Orleans Pelicans2020-21` 0.3039977 NaN NaN NaN
## `teamyearNew York Knicks2010-11` 0.0096927 NaN NaN NaN
## `teamyearNew York Knicks2011-12` 0.2958145 NaN NaN NaN
## `teamyearNew York Knicks2012-13` 0.1780819 NaN NaN NaN
## `teamyearNew York Knicks2013-14` 0.1470158 NaN NaN NaN
## `teamyearNew York Knicks2014-15` 0.0988409 NaN NaN NaN
## `teamyearNew York Knicks2015-16` -0.0529927 NaN NaN NaN
## `teamyearNew York Knicks2016-17` -0.0383117 NaN NaN NaN
## `teamyearNew York Knicks2017-18` -0.2417296 NaN NaN NaN
## `teamyearNew York Knicks2018-19` -0.0429831 NaN NaN NaN
## `teamyearNew York Knicks2019-20` 0.0076647 NaN NaN NaN
## `teamyearNew York Knicks2020-21` 0.0674672 NaN NaN NaN
## `teamyearOklahoma City Thunder2010-11` 0.3437169 NaN NaN NaN
## `teamyearOklahoma City Thunder2011-12` 0.0174791 NaN NaN NaN
## `teamyearOklahoma City Thunder2012-13` 0.0981463 NaN NaN NaN
## `teamyearOklahoma City Thunder2013-14` 0.3516530 NaN NaN NaN
## `teamyearOklahoma City Thunder2014-15` 0.2311675 NaN NaN NaN
## `teamyearOklahoma City Thunder2015-16` 0.0842381 NaN NaN NaN
## `teamyearOklahoma City Thunder2016-17` 0.1849052 NaN NaN NaN
## `teamyearOklahoma City Thunder2017-18` 0.0924273 NaN NaN NaN
## `teamyearOklahoma City Thunder2018-19` 0.1199002 NaN NaN NaN
## `teamyearOklahoma City Thunder2019-20` 0.0859089 NaN NaN NaN
## `teamyearOklahoma City Thunder2020-21` 0.1665207 NaN NaN NaN
## `teamyearOrlando Magic2010-11` 0.1488832 NaN NaN NaN
## `teamyearOrlando Magic2011-12` -0.0094997 NaN NaN NaN
## `teamyearOrlando Magic2012-13` -0.2636130 NaN NaN NaN
## `teamyearOrlando Magic2013-14` -0.2438058 NaN NaN NaN
## `teamyearOrlando Magic2014-15` -0.1520313 NaN NaN NaN
## `teamyearOrlando Magic2015-16` -0.2736652 NaN NaN NaN
## `teamyearOrlando Magic2016-17` -0.0557277 NaN NaN NaN
## `teamyearOrlando Magic2017-18` -0.1986977 NaN NaN NaN
## `teamyearOrlando Magic2018-19` -0.1576080 NaN NaN NaN
## `teamyearOrlando Magic2019-20` -0.0231618 NaN NaN NaN
## `teamyearOrlando Magic2020-21` 0.0528544 NaN NaN NaN
## `teamyearPhiladelphia 76ers2010-11` -0.2005945 NaN NaN NaN
## `teamyearPhiladelphia 76ers2011-12` -0.5374403 NaN NaN NaN
## `teamyearPhiladelphia 76ers2012-13` -0.3344300 NaN NaN NaN
## `teamyearPhiladelphia 76ers2013-14` 0.1691921 NaN NaN NaN
## `teamyearPhiladelphia 76ers2014-15` 0.3310643 NaN NaN NaN
## `teamyearPhiladelphia 76ers2015-16` -0.1871739 NaN NaN NaN
## `teamyearPhiladelphia 76ers2016-17` 0.2235636 NaN NaN NaN
## `teamyearPhiladelphia 76ers2017-18` 0.0837884 NaN NaN NaN
## `teamyearPhiladelphia 76ers2018-19` 0.1957846 NaN NaN NaN
## `teamyearPhiladelphia 76ers2019-20` -0.0042761 NaN NaN NaN
## `teamyearPhiladelphia 76ers2020-21` -0.1593981 NaN NaN NaN
## `teamyearPhoenix Suns2010-11` -0.1585045 NaN NaN NaN
## `teamyearPhoenix Suns2011-12` -0.1615403 NaN NaN NaN
## `teamyearPhoenix Suns2012-13` 0.0091653 NaN NaN NaN
## `teamyearPhoenix Suns2013-14` 0.2570906 NaN NaN NaN
## `teamyearPhoenix Suns2014-15` 0.2937425 NaN NaN NaN
## `teamyearPhoenix Suns2015-16` 0.3551474 NaN NaN NaN
## `teamyearPhoenix Suns2016-17` 0.2155744 NaN NaN NaN
## `teamyearPhoenix Suns2017-18` 0.0273122 NaN NaN NaN
## `teamyearPhoenix Suns2018-19` 0.1779865 NaN NaN NaN
## `teamyearPhoenix Suns2019-20` 0.0152782 NaN NaN NaN
## `teamyearPhoenix Suns2020-21` 0.0423756 NaN NaN NaN
## `teamyearPortland Trail Blazers2010-11` 0.2092400 NaN NaN NaN
## `teamyearPortland Trail Blazers2011-12` -0.0036266 NaN NaN NaN
## `teamyearPortland Trail Blazers2012-13` -0.0156736 NaN NaN NaN
## `teamyearPortland Trail Blazers2013-14` 0.2232786 NaN NaN NaN
## `teamyearPortland Trail Blazers2014-15` 0.1515900 NaN NaN NaN
## `teamyearPortland Trail Blazers2015-16` 0.0693791 NaN NaN NaN
## `teamyearPortland Trail Blazers2016-17` -0.1590403 NaN NaN NaN
## `teamyearPortland Trail Blazers2017-18` -0.1186725 NaN NaN NaN
## `teamyearPortland Trail Blazers2018-19` -0.0543219 NaN NaN NaN
## `teamyearPortland Trail Blazers2019-20` -0.3304231 NaN NaN NaN
## `teamyearPortland Trail Blazers2020-21` 0.1061964 NaN NaN NaN
## `teamyearSacramento Kings2010-11` -0.0266905 NaN NaN NaN
## `teamyearSacramento Kings2011-12` -0.0884379 NaN NaN NaN
## `teamyearSacramento Kings2012-13` -0.1734128 NaN NaN NaN
## `teamyearSacramento Kings2013-14` 0.1373627 NaN NaN NaN
## `teamyearSacramento Kings2014-15` 0.0022786 NaN NaN NaN
## `teamyearSacramento Kings2015-16` -0.0649962 NaN NaN NaN
## `teamyearSacramento Kings2016-17` -0.1361554 NaN NaN NaN
## `teamyearSacramento Kings2017-18` -0.2879962 NaN NaN NaN
## `teamyearSacramento Kings2018-19` -0.3274601 NaN NaN NaN
## `teamyearSacramento Kings2019-20` 0.0682753 NaN NaN NaN
## `teamyearSacramento Kings2020-21` -0.1353800 NaN NaN NaN
## `teamyearSan Antonio Spurs2010-11` -0.1378908 NaN NaN NaN
## `teamyearSan Antonio Spurs2011-12` -0.3725494 NaN NaN NaN
## `teamyearSan Antonio Spurs2012-13` -0.2709374 NaN NaN NaN
## `teamyearSan Antonio Spurs2013-14` -0.3735822 NaN NaN NaN
## `teamyearSan Antonio Spurs2014-15` -0.1351501 NaN NaN NaN
## `teamyearSan Antonio Spurs2015-16` -0.2549308 NaN NaN NaN
## `teamyearSan Antonio Spurs2016-17` -0.2242326 NaN NaN NaN
## `teamyearSan Antonio Spurs2017-18` -0.1579713 NaN NaN NaN
## `teamyearSan Antonio Spurs2018-19` -0.4623336 NaN NaN NaN
## `teamyearSan Antonio Spurs2019-20` -0.3849894 NaN NaN NaN
## `teamyearSan Antonio Spurs2020-21` -0.6439997 NaN NaN NaN
## `teamyearToronto Raptors2010-11` -0.1208131 NaN NaN NaN
## `teamyearToronto Raptors2011-12` 0.0582151 NaN NaN NaN
## `teamyearToronto Raptors2012-13` 0.1003347 NaN NaN NaN
## `teamyearToronto Raptors2013-14` 0.2681983 NaN NaN NaN
## `teamyearToronto Raptors2014-15` 0.0421980 NaN NaN NaN
## `teamyearToronto Raptors2015-16` -0.1275942 NaN NaN NaN
## `teamyearToronto Raptors2016-17` -0.0236250 NaN NaN NaN
## `teamyearToronto Raptors2017-18` -0.1911882 NaN NaN NaN
## `teamyearToronto Raptors2018-19` -0.0207293 NaN NaN NaN
## `teamyearToronto Raptors2019-20` 0.1231172 NaN NaN NaN
## `teamyearToronto Raptors2020-21` 0.0858739 NaN NaN NaN
## `teamyearUtah Jazz2010-11` -0.0513341 NaN NaN NaN
## `teamyearUtah Jazz2011-12` -0.0314443 NaN NaN NaN
## `teamyearUtah Jazz2012-13` -0.2320123 NaN NaN NaN
## `teamyearUtah Jazz2013-14` NA NA NA NA
## `teamyearUtah Jazz2014-15` NA NA NA NA
## `teamyearUtah Jazz2015-16` NA NA NA NA
## `teamyearUtah Jazz2016-17` NA NA NA NA
## `teamyearUtah Jazz2017-18` NA NA NA NA
## `teamyearUtah Jazz2018-19` NA NA NA NA
## `teamyearUtah Jazz2019-20` NA NA NA NA
## `teamyearUtah Jazz2020-21` NA NA NA NA
## `teamyearWashington Wizards2010-11` NA NA NA NA
## `teamyearWashington Wizards2011-12` NA NA NA NA
## `teamyearWashington Wizards2012-13` NA NA NA NA
## `teamyearWashington Wizards2013-14` NA NA NA NA
## `teamyearWashington Wizards2014-15` NA NA NA NA
## `teamyearWashington Wizards2015-16` NA NA NA NA
## `teamyearWashington Wizards2016-17` NA NA NA NA
## `teamyearWashington Wizards2017-18` NA NA NA NA
## `teamyearWashington Wizards2018-19` NA NA NA NA
## `teamyearWashington Wizards2019-20` NA NA NA NA
## `teamyearWashington Wizards2020-21` NA NA NA NA
##
## Residual standard error: NaN on 0 degrees of freedom
## Multiple R-squared: 1, Adjusted R-squared: NaN
## F-statistic: NaN on 328 and 0 DF, p-value: NA
print(modelkfold)
## Linear Regression
##
## 329 samples
## 29 predictor
##
## No pre-processing
## Resampling: Cross-Validated (10 fold)
## Summary of sample sizes: 296, 297, 295, 295, 297, 298, ...
## Resampling results:
##
## RMSE Rsquared MAE
## 0.5749906 0.2729131 0.4329982
##
## Tuning parameter 'intercept' was held constant at a value of TRUE
#2) K-fold: RMSE=0.06133163 Rsquared=0.8158944 MAE=0.04542365
set.seed(125)
train_control<- trainControl(method = "repeatedcv",
number = 5, repeats = 3)
modelkrep<- train(WIN. ~.-teamstatspk -TEAM -GP -W -L -MIN -PTS -SEASON -PFD, data = df, method = "lm", trControl = train_control)
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
summary(modelkrep)
##
## Call:
## lm(formula = .outcome ~ ., data = dat)
##
## Residuals:
## ALL 329 residuals are 0: no residual degrees of freedom!
##
## Coefficients: (19 not defined because of singularities)
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.4311673 NaN NaN NaN
## FGM 0.5944847 NaN NaN NaN
## FGA -0.2565875 NaN NaN NaN
## FG. -0.4483804 NaN NaN NaN
## X3PM 0.1040710 NaN NaN NaN
## X3PA -0.0467215 NaN NaN NaN
## X3P. 0.0128754 NaN NaN NaN
## FTM -0.0102516 NaN NaN NaN
## FTA -0.0055537 NaN NaN NaN
## FT. -0.0158383 NaN NaN NaN
## OREB 0.1955374 NaN NaN NaN
## DREB 0.2260415 NaN NaN NaN
## REB -0.2342255 NaN NaN NaN
## AST 0.0030429 NaN NaN NaN
## TOV -0.0621965 NaN NaN NaN
## STL -0.0366246 NaN NaN NaN
## BLK 0.0879942 NaN NaN NaN
## BLKA 0.1646267 NaN NaN NaN
## PF -0.0408055 NaN NaN NaN
## X... 0.0211331 NaN NaN NaN
## `teamyearAtlanta Hawks2011-12` -0.2133474 NaN NaN NaN
## `teamyearAtlanta Hawks2012-13` -0.1517303 NaN NaN NaN
## `teamyearAtlanta Hawks2013-14` 0.1291764 NaN NaN NaN
## `teamyearAtlanta Hawks2014-15` -0.1187661 NaN NaN NaN
## `teamyearAtlanta Hawks2015-16` -0.0973143 NaN NaN NaN
## `teamyearAtlanta Hawks2016-17` 0.0005247 NaN NaN NaN
## `teamyearAtlanta Hawks2017-18` -0.1356691 NaN NaN NaN
## `teamyearAtlanta Hawks2018-19` 0.2577126 NaN NaN NaN
## `teamyearAtlanta Hawks2019-20` 0.1766134 NaN NaN NaN
## `teamyearAtlanta Hawks2020-21` -0.2826616 NaN NaN NaN
## `teamyearBoston Celtics2010-11` 0.0525077 NaN NaN NaN
## `teamyearBoston Celtics2011-12` -0.1862722 NaN NaN NaN
## `teamyearBoston Celtics2012-13` -0.0160660 NaN NaN NaN
## `teamyearBoston Celtics2013-14` 0.2698715 NaN NaN NaN
## `teamyearBoston Celtics2014-15` 0.1630440 NaN NaN NaN
## `teamyearBoston Celtics2015-16` 0.2601487 NaN NaN NaN
## `teamyearBoston Celtics2016-17` 0.1232531 NaN NaN NaN
## `teamyearBoston Celtics2017-18` 0.0537081 NaN NaN NaN
## `teamyearBoston Celtics2018-19` -0.0957987 NaN NaN NaN
## `teamyearBoston Celtics2019-20` -0.0896731 NaN NaN NaN
## `teamyearBoston Celtics2020-21` 0.0730948 NaN NaN NaN
## `teamyearBrooklyn Nets2012-13` 0.0477864 NaN NaN NaN
## `teamyearBrooklyn Nets2013-14` 0.2996191 NaN NaN NaN
## `teamyearBrooklyn Nets2014-15` 0.0938296 NaN NaN NaN
## `teamyearBrooklyn Nets2015-16` -0.2308554 NaN NaN NaN
## `teamyearBrooklyn Nets2016-17` 0.1374251 NaN NaN NaN
## `teamyearBrooklyn Nets2017-18` -0.0116496 NaN NaN NaN
## `teamyearBrooklyn Nets2018-19` 0.1638592 NaN NaN NaN
## `teamyearBrooklyn Nets2019-20` 0.1952864 NaN NaN NaN
## `teamyearBrooklyn Nets2020-21` -0.1735820 NaN NaN NaN
## `teamyearCharlotte Bobcats2010-11` -0.2413079 NaN NaN NaN
## `teamyearCharlotte Bobcats2011-12` -0.2757466 NaN NaN NaN
## `teamyearCharlotte Bobcats2012-13` -0.3880623 NaN NaN NaN
## `teamyearCharlotte Bobcats2013-14` -0.3664915 NaN NaN NaN
## `teamyearCharlotte Hornets2014-15` -0.2806684 NaN NaN NaN
## `teamyearCharlotte Hornets2015-16` -0.2235957 NaN NaN NaN
## `teamyearCharlotte Hornets2016-17` -0.3358521 NaN NaN NaN
## `teamyearCharlotte Hornets2017-18` -0.3121027 NaN NaN NaN
## `teamyearCharlotte Hornets2018-19` -0.2638473 NaN NaN NaN
## `teamyearCharlotte Hornets2019-20` 0.1000713 NaN NaN NaN
## `teamyearCharlotte Hornets2020-21` -0.1166541 NaN NaN NaN
## `teamyearChicago Bulls2010-11` -0.2075817 NaN NaN NaN
## `teamyearChicago Bulls2011-12` -0.3102177 NaN NaN NaN
## `teamyearChicago Bulls2012-13` -0.1227661 NaN NaN NaN
## `teamyearChicago Bulls2013-14` -0.1154258 NaN NaN NaN
## `teamyearChicago Bulls2014-15` -0.0962440 NaN NaN NaN
## `teamyearChicago Bulls2015-16` -0.3433810 NaN NaN NaN
## `teamyearChicago Bulls2016-17` 0.1131451 NaN NaN NaN
## `teamyearChicago Bulls2017-18` 0.0166194 NaN NaN NaN
## `teamyearChicago Bulls2018-19` -0.2521539 NaN NaN NaN
## `teamyearChicago Bulls2019-20` 0.0781278 NaN NaN NaN
## `teamyearChicago Bulls2020-21` -0.3511644 NaN NaN NaN
## `teamyearCleveland Cavaliers2010-11` -0.2159836 NaN NaN NaN
## `teamyearCleveland Cavaliers2011-12` -0.0242818 NaN NaN NaN
## `teamyearCleveland Cavaliers2012-13` -0.2311183 NaN NaN NaN
## `teamyearCleveland Cavaliers2013-14` -0.0208091 NaN NaN NaN
## `teamyearCleveland Cavaliers2014-15` 0.0310640 NaN NaN NaN
## `teamyearCleveland Cavaliers2015-16` 0.0554832 NaN NaN NaN
## `teamyearCleveland Cavaliers2016-17` -0.1637696 NaN NaN NaN
## `teamyearCleveland Cavaliers2017-18` -0.0633567 NaN NaN NaN
## `teamyearCleveland Cavaliers2018-19` 0.0276707 NaN NaN NaN
## `teamyearCleveland Cavaliers2019-20` -0.1781557 NaN NaN NaN
## `teamyearCleveland Cavaliers2020-21` -0.0185170 NaN NaN NaN
## `teamyearDallas Mavericks2010-11` 0.1830877 NaN NaN NaN
## `teamyearDallas Mavericks2011-12` 0.1619789 NaN NaN NaN
## `teamyearDallas Mavericks2012-13` -0.1187100 NaN NaN NaN
## `teamyearDallas Mavericks2013-14` 0.0769210 NaN NaN NaN
## `teamyearDallas Mavericks2014-15` 0.0860324 NaN NaN NaN
## `teamyearDallas Mavericks2015-16` 0.1338824 NaN NaN NaN
## `teamyearDallas Mavericks2016-17` 0.1236183 NaN NaN NaN
## `teamyearDallas Mavericks2017-18` -0.2086093 NaN NaN NaN
## `teamyearDallas Mavericks2018-19` 0.1820201 NaN NaN NaN
## `teamyearDallas Mavericks2019-20` -0.1286508 NaN NaN NaN
## `teamyearDallas Mavericks2020-21` 0.2418001 NaN NaN NaN
## `teamyearDenver Nuggets2010-11` -0.2582671 NaN NaN NaN
## `teamyearDenver Nuggets2011-12` -0.2747856 NaN NaN NaN
## `teamyearDenver Nuggets2012-13` -0.4075264 NaN NaN NaN
## `teamyearDenver Nuggets2013-14` 0.0259418 NaN NaN NaN
## `teamyearDenver Nuggets2014-15` 0.1217563 NaN NaN NaN
## `teamyearDenver Nuggets2015-16` -0.0390526 NaN NaN NaN
## `teamyearDenver Nuggets2016-17` -0.1162452 NaN NaN NaN
## `teamyearDenver Nuggets2017-18` -0.1435577 NaN NaN NaN
## `teamyearDenver Nuggets2018-19` -0.0534162 NaN NaN NaN
## `teamyearDenver Nuggets2019-20` -0.0223915 NaN NaN NaN
## `teamyearDenver Nuggets2020-21` -0.0879117 NaN NaN NaN
## `teamyearDetroit Pistons2010-11` -0.2819911 NaN NaN NaN
## `teamyearDetroit Pistons2011-12` 0.0384161 NaN NaN NaN
## `teamyearDetroit Pistons2012-13` -0.2849368 NaN NaN NaN
## `teamyearDetroit Pistons2013-14` 0.0616294 NaN NaN NaN
## `teamyearDetroit Pistons2014-15` -0.0894348 NaN NaN NaN
## `teamyearDetroit Pistons2015-16` 0.1169387 NaN NaN NaN
## `teamyearDetroit Pistons2016-17` -0.1381258 NaN NaN NaN
## `teamyearDetroit Pistons2017-18` -0.2234189 NaN NaN NaN
## `teamyearDetroit Pistons2018-19` 0.2686260 NaN NaN NaN
## `teamyearDetroit Pistons2019-20` -0.3144622 NaN NaN NaN
## `teamyearDetroit Pistons2020-21` 0.3734828 NaN NaN NaN
## `teamyearGolden State Warriors2010-11` -0.0721128 NaN NaN NaN
## `teamyearGolden State Warriors2011-12` -0.3843363 NaN NaN NaN
## `teamyearGolden State Warriors2012-13` -0.0131001 NaN NaN NaN
## `teamyearGolden State Warriors2013-14` 0.0205074 NaN NaN NaN
## `teamyearGolden State Warriors2014-15` -0.1479260 NaN NaN NaN
## `teamyearGolden State Warriors2015-16` -0.2394290 NaN NaN NaN
## `teamyearGolden State Warriors2016-17` -0.2729083 NaN NaN NaN
## `teamyearGolden State Warriors2017-18` -0.3566062 NaN NaN NaN
## `teamyearGolden State Warriors2018-19` -0.2277037 NaN NaN NaN
## `teamyearGolden State Warriors2019-20` 0.2396403 NaN NaN NaN
## `teamyearGolden State Warriors2020-21` 0.2742604 NaN NaN NaN
## `teamyearHouston Rockets2010-11` -0.1862883 NaN NaN NaN
## `teamyearHouston Rockets2011-12` -0.0407815 NaN NaN NaN
## `teamyearHouston Rockets2012-13` -0.0232152 NaN NaN NaN
## `teamyearHouston Rockets2013-14` 0.0239236 NaN NaN NaN
## `teamyearHouston Rockets2014-15` 0.4455376 NaN NaN NaN
## `teamyearHouston Rockets2015-16` 0.3322976 NaN NaN NaN
## `teamyearHouston Rockets2016-17` 0.2114200 NaN NaN NaN
## `teamyearHouston Rockets2017-18` 0.2847693 NaN NaN NaN
## `teamyearHouston Rockets2018-19` 0.3964746 NaN NaN NaN
## `teamyearHouston Rockets2019-20` 0.3906479 NaN NaN NaN
## `teamyearHouston Rockets2020-21` 0.0375321 NaN NaN NaN
## `teamyearIndiana Pacers2010-11` -0.0197963 NaN NaN NaN
## `teamyearIndiana Pacers2011-12` -0.0390898 NaN NaN NaN
## `teamyearIndiana Pacers2012-13` -0.0645802 NaN NaN NaN
## `teamyearIndiana Pacers2013-14` 0.1385260 NaN NaN NaN
## `teamyearIndiana Pacers2014-15` -0.0254794 NaN NaN NaN
## `teamyearIndiana Pacers2015-16` 0.1669373 NaN NaN NaN
## `teamyearIndiana Pacers2016-17` -0.2212116 NaN NaN NaN
## `teamyearIndiana Pacers2017-18` -0.3006089 NaN NaN NaN
## `teamyearIndiana Pacers2018-19` -0.4286275 NaN NaN NaN
## `teamyearIndiana Pacers2019-20` -0.3267538 NaN NaN NaN
## `teamyearIndiana Pacers2020-21` -0.0716799 NaN NaN NaN
## `teamyearLA Clippers2015-16` 0.0383930 NaN NaN NaN
## `teamyearLA Clippers2016-17` 0.0808312 NaN NaN NaN
## `teamyearLA Clippers2017-18` -0.2081139 NaN NaN NaN
## `teamyearLA Clippers2018-19` -0.2586835 NaN NaN NaN
## `teamyearLA Clippers2019-20` 0.1025060 NaN NaN NaN
## `teamyearLA Clippers2020-21` 0.0748300 NaN NaN NaN
## `teamyearLos Angeles Clippers2010-11` 0.0376014 NaN NaN NaN
## `teamyearLos Angeles Clippers2011-12` 0.0063288 NaN NaN NaN
## `teamyearLos Angeles Clippers2012-13` 0.0705054 NaN NaN NaN
## `teamyearLos Angeles Clippers2013-14` 0.2674938 NaN NaN NaN
## `teamyearLos Angeles Clippers2014-15` -0.0292556 NaN NaN NaN
## `teamyearLos Angeles Lakers2010-11` 0.0047425 NaN NaN NaN
## `teamyearLos Angeles Lakers2011-12` 0.0616037 NaN NaN NaN
## `teamyearLos Angeles Lakers2012-13` -0.0859838 NaN NaN NaN
## `teamyearLos Angeles Lakers2013-14` -0.2487057 NaN NaN NaN
## `teamyearLos Angeles Lakers2014-15` -0.0243193 NaN NaN NaN
## `teamyearLos Angeles Lakers2015-16` 0.2203009 NaN NaN NaN
## `teamyearLos Angeles Lakers2016-17` 0.0926612 NaN NaN NaN
## `teamyearLos Angeles Lakers2017-18` -0.0657267 NaN NaN NaN
## `teamyearLos Angeles Lakers2018-19` -0.2272627 NaN NaN NaN
## `teamyearLos Angeles Lakers2019-20` 0.0794400 NaN NaN NaN
## `teamyearLos Angeles Lakers2020-21` 0.0136196 NaN NaN NaN
## `teamyearMemphis Grizzlies2010-11` -0.3028562 NaN NaN NaN
## `teamyearMemphis Grizzlies2011-12` 0.0646447 NaN NaN NaN
## `teamyearMemphis Grizzlies2012-13` 0.0509500 NaN NaN NaN
## `teamyearMemphis Grizzlies2013-14` -0.2092255 NaN NaN NaN
## `teamyearMemphis Grizzlies2014-15` -0.0164236 NaN NaN NaN
## `teamyearMemphis Grizzlies2015-16` 0.1229993 NaN NaN NaN
## `teamyearMemphis Grizzlies2016-17` 0.1932017 NaN NaN NaN
## `teamyearMemphis Grizzlies2017-18` 0.0976579 NaN NaN NaN
## `teamyearMemphis Grizzlies2018-19` -0.0004045 NaN NaN NaN
## `teamyearMemphis Grizzlies2019-20` -0.1530269 NaN NaN NaN
## `teamyearMemphis Grizzlies2020-21` -0.2854307 NaN NaN NaN
## `teamyearMiami Heat2010-11` 0.2188244 NaN NaN NaN
## `teamyearMiami Heat2011-12` 0.1147427 NaN NaN NaN
## `teamyearMiami Heat2012-13` 0.0360935 NaN NaN NaN
## `teamyearMiami Heat2013-14` 0.3153462 NaN NaN NaN
## `teamyearMiami Heat2014-15` 0.1323170 NaN NaN NaN
## `teamyearMiami Heat2015-16` -0.1974427 NaN NaN NaN
## `teamyearMiami Heat2016-17` -0.3265476 NaN NaN NaN
## `teamyearMiami Heat2017-18` -0.0652167 NaN NaN NaN
## `teamyearMiami Heat2018-19` -0.0368395 NaN NaN NaN
## `teamyearMiami Heat2019-20` 0.1369537 NaN NaN NaN
## `teamyearMiami Heat2020-21` 0.3305389 NaN NaN NaN
## `teamyearMilwaukee Bucks2010-11` -0.0192112 NaN NaN NaN
## `teamyearMilwaukee Bucks2011-12` 0.0656326 NaN NaN NaN
## `teamyearMilwaukee Bucks2012-13` -0.0304368 NaN NaN NaN
## `teamyearMilwaukee Bucks2013-14` -0.1239004 NaN NaN NaN
## `teamyearMilwaukee Bucks2014-15` 0.1793413 NaN NaN NaN
## `teamyearMilwaukee Bucks2015-16` -0.2822463 NaN NaN NaN
## `teamyearMilwaukee Bucks2016-17` -0.1875440 NaN NaN NaN
## `teamyearMilwaukee Bucks2017-18` -0.0940915 NaN NaN NaN
## `teamyearMilwaukee Bucks2018-19` -0.2669620 NaN NaN NaN
## `teamyearMilwaukee Bucks2019-20` -0.1511399 NaN NaN NaN
## `teamyearMilwaukee Bucks2020-21` 0.0449801 NaN NaN NaN
## `teamyearMinnesota Timberwolves2011-12` -0.0321972 NaN NaN NaN
## `teamyearMinnesota Timberwolves2012-13` -0.1045819 NaN NaN NaN
## `teamyearMinnesota Timberwolves2013-14` 0.0159274 NaN NaN NaN
## `teamyearMinnesota Timberwolves2014-15` 0.0013414 NaN NaN NaN
## `teamyearMinnesota Timberwolves2015-16` 0.0392003 NaN NaN NaN
## `teamyearMinnesota Timberwolves2016-17` -0.1594390 NaN NaN NaN
## `teamyearMinnesota Timberwolves2017-18` -0.1824130 NaN NaN NaN
## `teamyearMinnesota Timberwolves2018-19` -0.1651737 NaN NaN NaN
## `teamyearMinnesota Timberwolves2019-20` 0.1350711 NaN NaN NaN
## `teamyearMinnesota Timberwolves2020-21` 0.1376349 NaN NaN NaN
## `teamyearNew Jersey Nets2010-11` -0.0249416 NaN NaN NaN
## `teamyearNew Jersey Nets2011-12` 0.1448652 NaN NaN NaN
## `teamyearNew Orleans Hornets2010-11` -0.0517185 NaN NaN NaN
## `teamyearNew Orleans Hornets2011-12` -0.2029854 NaN NaN NaN
## `teamyearNew Orleans Hornets2012-13` -0.3632581 NaN NaN NaN
## `teamyearNew Orleans Pelicans2013-14` -0.3706200 NaN NaN NaN
## `teamyearNew Orleans Pelicans2014-15` -0.5277538 NaN NaN NaN
## `teamyearNew Orleans Pelicans2015-16` -0.1475548 NaN NaN NaN
## `teamyearNew Orleans Pelicans2016-17` -0.2038947 NaN NaN NaN
## `teamyearNew Orleans Pelicans2017-18` -0.3160176 NaN NaN NaN
## `teamyearNew Orleans Pelicans2018-19` -0.3831455 NaN NaN NaN
## `teamyearNew Orleans Pelicans2019-20` -0.0992951 NaN NaN NaN
## `teamyearNew Orleans Pelicans2020-21` 0.3039977 NaN NaN NaN
## `teamyearNew York Knicks2010-11` 0.0096927 NaN NaN NaN
## `teamyearNew York Knicks2011-12` 0.2958145 NaN NaN NaN
## `teamyearNew York Knicks2012-13` 0.1780819 NaN NaN NaN
## `teamyearNew York Knicks2013-14` 0.1470158 NaN NaN NaN
## `teamyearNew York Knicks2014-15` 0.0988409 NaN NaN NaN
## `teamyearNew York Knicks2015-16` -0.0529927 NaN NaN NaN
## `teamyearNew York Knicks2016-17` -0.0383117 NaN NaN NaN
## `teamyearNew York Knicks2017-18` -0.2417296 NaN NaN NaN
## `teamyearNew York Knicks2018-19` -0.0429831 NaN NaN NaN
## `teamyearNew York Knicks2019-20` 0.0076647 NaN NaN NaN
## `teamyearNew York Knicks2020-21` 0.0674672 NaN NaN NaN
## `teamyearOklahoma City Thunder2010-11` 0.3437169 NaN NaN NaN
## `teamyearOklahoma City Thunder2011-12` 0.0174791 NaN NaN NaN
## `teamyearOklahoma City Thunder2012-13` 0.0981463 NaN NaN NaN
## `teamyearOklahoma City Thunder2013-14` 0.3516530 NaN NaN NaN
## `teamyearOklahoma City Thunder2014-15` 0.2311675 NaN NaN NaN
## `teamyearOklahoma City Thunder2015-16` 0.0842381 NaN NaN NaN
## `teamyearOklahoma City Thunder2016-17` 0.1849052 NaN NaN NaN
## `teamyearOklahoma City Thunder2017-18` 0.0924273 NaN NaN NaN
## `teamyearOklahoma City Thunder2018-19` 0.1199002 NaN NaN NaN
## `teamyearOklahoma City Thunder2019-20` 0.0859089 NaN NaN NaN
## `teamyearOklahoma City Thunder2020-21` 0.1665207 NaN NaN NaN
## `teamyearOrlando Magic2010-11` 0.1488832 NaN NaN NaN
## `teamyearOrlando Magic2011-12` -0.0094997 NaN NaN NaN
## `teamyearOrlando Magic2012-13` -0.2636130 NaN NaN NaN
## `teamyearOrlando Magic2013-14` -0.2438058 NaN NaN NaN
## `teamyearOrlando Magic2014-15` -0.1520313 NaN NaN NaN
## `teamyearOrlando Magic2015-16` -0.2736652 NaN NaN NaN
## `teamyearOrlando Magic2016-17` -0.0557277 NaN NaN NaN
## `teamyearOrlando Magic2017-18` -0.1986977 NaN NaN NaN
## `teamyearOrlando Magic2018-19` -0.1576080 NaN NaN NaN
## `teamyearOrlando Magic2019-20` -0.0231618 NaN NaN NaN
## `teamyearOrlando Magic2020-21` 0.0528544 NaN NaN NaN
## `teamyearPhiladelphia 76ers2010-11` -0.2005945 NaN NaN NaN
## `teamyearPhiladelphia 76ers2011-12` -0.5374403 NaN NaN NaN
## `teamyearPhiladelphia 76ers2012-13` -0.3344300 NaN NaN NaN
## `teamyearPhiladelphia 76ers2013-14` 0.1691921 NaN NaN NaN
## `teamyearPhiladelphia 76ers2014-15` 0.3310643 NaN NaN NaN
## `teamyearPhiladelphia 76ers2015-16` -0.1871739 NaN NaN NaN
## `teamyearPhiladelphia 76ers2016-17` 0.2235636 NaN NaN NaN
## `teamyearPhiladelphia 76ers2017-18` 0.0837884 NaN NaN NaN
## `teamyearPhiladelphia 76ers2018-19` 0.1957846 NaN NaN NaN
## `teamyearPhiladelphia 76ers2019-20` -0.0042761 NaN NaN NaN
## `teamyearPhiladelphia 76ers2020-21` -0.1593981 NaN NaN NaN
## `teamyearPhoenix Suns2010-11` -0.1585045 NaN NaN NaN
## `teamyearPhoenix Suns2011-12` -0.1615403 NaN NaN NaN
## `teamyearPhoenix Suns2012-13` 0.0091653 NaN NaN NaN
## `teamyearPhoenix Suns2013-14` 0.2570906 NaN NaN NaN
## `teamyearPhoenix Suns2014-15` 0.2937425 NaN NaN NaN
## `teamyearPhoenix Suns2015-16` 0.3551474 NaN NaN NaN
## `teamyearPhoenix Suns2016-17` 0.2155744 NaN NaN NaN
## `teamyearPhoenix Suns2017-18` 0.0273122 NaN NaN NaN
## `teamyearPhoenix Suns2018-19` 0.1779865 NaN NaN NaN
## `teamyearPhoenix Suns2019-20` 0.0152782 NaN NaN NaN
## `teamyearPhoenix Suns2020-21` 0.0423756 NaN NaN NaN
## `teamyearPortland Trail Blazers2010-11` 0.2092400 NaN NaN NaN
## `teamyearPortland Trail Blazers2011-12` -0.0036266 NaN NaN NaN
## `teamyearPortland Trail Blazers2012-13` -0.0156736 NaN NaN NaN
## `teamyearPortland Trail Blazers2013-14` 0.2232786 NaN NaN NaN
## `teamyearPortland Trail Blazers2014-15` 0.1515900 NaN NaN NaN
## `teamyearPortland Trail Blazers2015-16` 0.0693791 NaN NaN NaN
## `teamyearPortland Trail Blazers2016-17` -0.1590403 NaN NaN NaN
## `teamyearPortland Trail Blazers2017-18` -0.1186725 NaN NaN NaN
## `teamyearPortland Trail Blazers2018-19` -0.0543219 NaN NaN NaN
## `teamyearPortland Trail Blazers2019-20` -0.3304231 NaN NaN NaN
## `teamyearPortland Trail Blazers2020-21` 0.1061964 NaN NaN NaN
## `teamyearSacramento Kings2010-11` -0.0266905 NaN NaN NaN
## `teamyearSacramento Kings2011-12` -0.0884379 NaN NaN NaN
## `teamyearSacramento Kings2012-13` -0.1734128 NaN NaN NaN
## `teamyearSacramento Kings2013-14` 0.1373627 NaN NaN NaN
## `teamyearSacramento Kings2014-15` 0.0022786 NaN NaN NaN
## `teamyearSacramento Kings2015-16` -0.0649962 NaN NaN NaN
## `teamyearSacramento Kings2016-17` -0.1361554 NaN NaN NaN
## `teamyearSacramento Kings2017-18` -0.2879962 NaN NaN NaN
## `teamyearSacramento Kings2018-19` -0.3274601 NaN NaN NaN
## `teamyearSacramento Kings2019-20` 0.0682753 NaN NaN NaN
## `teamyearSacramento Kings2020-21` -0.1353800 NaN NaN NaN
## `teamyearSan Antonio Spurs2010-11` -0.1378908 NaN NaN NaN
## `teamyearSan Antonio Spurs2011-12` -0.3725494 NaN NaN NaN
## `teamyearSan Antonio Spurs2012-13` -0.2709374 NaN NaN NaN
## `teamyearSan Antonio Spurs2013-14` -0.3735822 NaN NaN NaN
## `teamyearSan Antonio Spurs2014-15` -0.1351501 NaN NaN NaN
## `teamyearSan Antonio Spurs2015-16` -0.2549308 NaN NaN NaN
## `teamyearSan Antonio Spurs2016-17` -0.2242326 NaN NaN NaN
## `teamyearSan Antonio Spurs2017-18` -0.1579713 NaN NaN NaN
## `teamyearSan Antonio Spurs2018-19` -0.4623336 NaN NaN NaN
## `teamyearSan Antonio Spurs2019-20` -0.3849894 NaN NaN NaN
## `teamyearSan Antonio Spurs2020-21` -0.6439997 NaN NaN NaN
## `teamyearToronto Raptors2010-11` -0.1208131 NaN NaN NaN
## `teamyearToronto Raptors2011-12` 0.0582151 NaN NaN NaN
## `teamyearToronto Raptors2012-13` 0.1003347 NaN NaN NaN
## `teamyearToronto Raptors2013-14` 0.2681983 NaN NaN NaN
## `teamyearToronto Raptors2014-15` 0.0421980 NaN NaN NaN
## `teamyearToronto Raptors2015-16` -0.1275942 NaN NaN NaN
## `teamyearToronto Raptors2016-17` -0.0236250 NaN NaN NaN
## `teamyearToronto Raptors2017-18` -0.1911882 NaN NaN NaN
## `teamyearToronto Raptors2018-19` -0.0207293 NaN NaN NaN
## `teamyearToronto Raptors2019-20` 0.1231172 NaN NaN NaN
## `teamyearToronto Raptors2020-21` 0.0858739 NaN NaN NaN
## `teamyearUtah Jazz2010-11` -0.0513341 NaN NaN NaN
## `teamyearUtah Jazz2011-12` -0.0314443 NaN NaN NaN
## `teamyearUtah Jazz2012-13` -0.2320123 NaN NaN NaN
## `teamyearUtah Jazz2013-14` NA NA NA NA
## `teamyearUtah Jazz2014-15` NA NA NA NA
## `teamyearUtah Jazz2015-16` NA NA NA NA
## `teamyearUtah Jazz2016-17` NA NA NA NA
## `teamyearUtah Jazz2017-18` NA NA NA NA
## `teamyearUtah Jazz2018-19` NA NA NA NA
## `teamyearUtah Jazz2019-20` NA NA NA NA
## `teamyearUtah Jazz2020-21` NA NA NA NA
## `teamyearWashington Wizards2010-11` NA NA NA NA
## `teamyearWashington Wizards2011-12` NA NA NA NA
## `teamyearWashington Wizards2012-13` NA NA NA NA
## `teamyearWashington Wizards2013-14` NA NA NA NA
## `teamyearWashington Wizards2014-15` NA NA NA NA
## `teamyearWashington Wizards2015-16` NA NA NA NA
## `teamyearWashington Wizards2016-17` NA NA NA NA
## `teamyearWashington Wizards2017-18` NA NA NA NA
## `teamyearWashington Wizards2018-19` NA NA NA NA
## `teamyearWashington Wizards2019-20` NA NA NA NA
## `teamyearWashington Wizards2020-21` NA NA NA NA
##
## Residual standard error: NaN on 0 degrees of freedom
## Multiple R-squared: 1, Adjusted R-squared: NaN
## F-statistic: NaN on 328 and 0 DF, p-value: NA
print(modelkrep)
## Linear Regression
##
## 329 samples
## 29 predictor
##
## No pre-processing
## Resampling: Cross-Validated (5 fold, repeated 3 times)
## Summary of sample sizes: 264, 262, 264, 263, 263, 263, ...
## Resampling results:
##
## RMSE Rsquared MAE
## 0.3627985 0.2279464 0.2880722
##
## Tuning parameter 'intercept' was held constant at a value of TRUE
#3) K-repeated: RMSE=0.3627985 Rsquared=0.2279464 MAE=0.2880722
training.samples <- createDataPartition(df$WIN., p = 0.8, list = FALSE)
train.data <- df[training.samples, ]
test.data <- df[-training.samples, ]
modelholdout <- train(WIN. ~.-teamstatspk -TEAM -GP -W -L -MIN -PTS -SEASON -PFD, data = df, method = "lm")
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
## Warning in predict.lm(modelFit, newdata): prediction from a rank-deficient fit
## may be misleading
print(modelholdout) #RMSE=0.06401851 Rsquared=0.7941777 MAE=0.04783168
## Linear Regression
##
## 329 samples
## 29 predictor
##
## No pre-processing
## Resampling: Bootstrapped (25 reps)
## Summary of sample sizes: 329, 329, 329, 329, 329, 329, ...
## Resampling results:
##
## RMSE Rsquared MAE
## 6.525762 0.2018802 4.892446
##
## Tuning parameter 'intercept' was held constant at a value of TRUE
#4) Holdout: RMSE=0.06401851 Rsquared=0.7941777 MAE=0.04783168 #Conclusion: K-fold is by far the best cross validation method. Unsure of applications.